forked from rainycape/unidecode
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
decode: Reduce allocations, memory usage & table size (#6)
Remove original runes from table, compute them from position, fill-in highly compressible dummy ranges instead -> results in 210950 Byte table.go instead of 401301 Bytes Benchmarks improvements: benchmark old ns/op new ns/op delta BenchmarkUnidecode-12 436 434 -0.34% BenchmarkDecodeTable-12 7930175 5941300 -25.08% benchmark old allocs new allocs delta BenchmarkUnidecode-12 6 6 +0.00% BenchmarkDecodeTable-12 89332 44491 -50.20% benchmark old bytes new bytes delta BenchmarkUnidecode-12 120 120 +0.00% BenchmarkDecodeTable-12 1071070 826012 -22.88%
- Loading branch information
Showing
3 changed files
with
29 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters