https://github.com/willbasky/benchmarks
Benchmarks, just to check different approaches.
https://github.com/willbasky/benchmarks
Last synced: 3 months ago
JSON representation
Benchmarks, just to check different approaches.
- Host: GitHub
- URL: https://github.com/willbasky/benchmarks
- Owner: willbasky
- License: bsd-3-clause
- Created: 2021-07-15T14:07:41.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2023-09-09T21:04:45.000Z (almost 3 years ago)
- Last Synced: 2025-12-30T14:34:12.091Z (6 months ago)
- Language: HTML
- Homepage:
- Size: 7.92 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# benchmarks
## Validate input
Comapre approaches to validate text data.
- `validateInput` multi traversing of elem
- `validateInputAtto` usual Attoparsec parser
- `validateInputOptimized` refactored first approach. `Elem` shrinked.
- `validateInputTextIcu` regex with `PCRE`.
It has icu library build issue. Hence it turned off.
- `validateInputRegexPosix` regex with `Posix`
- `validateInputRegexTDFA` regex with `Posix`
- `validateInputRegexPCRE` regex with `Posix`
[text results](benchmark/Output/validate_input.md)
[visual results](benchmark/Output/validate_input_visual.md)
## Show sumtype
Compare generic `show` against approach using `unpack`.
`Unpack` (from Text to String) reduces operation speed in 6-7 times.
[text results](benchmark/Output/unpack_overhead.md)
[visual results](benchmark/Output/unpack_overhead_visual.md)
## FromList to Set
Compare overheads of using `fromList` which nub duplicates.
And traversinf with predicate.
`fromList` decrease performance to 14-30 times.
[text results](benchmark/Output/from_list.md)
[visual results](benchmark/Output/from_list.md)