Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | tools/smaz: use the new validation function instead of ad-hoc code |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
3a95d52c867f7f19c13715f1567c4ac2 |
User & Date: | nat 2016-12-15 20:12:50 |
Context
2016-12-16
| ||
20:55 |
smaz_generic: optimize compression
For some reason it seems even with -O3, calling Dict_Entry involves a string copy, which makes `memcpy` the larger time consumer of the copmpression algorithm. Inlining it manually improves performance a lot. check-in: 674fadc74b user: nat tags: trunk | |
2016-12-15
| ||
20:12 | tools/smaz: use the new validation function instead of ad-hoc code check-in: 3a95d52c86 user: nat tags: trunk | |
2016-12-14
| ||
20:01 |
smaz_generic: brind the predicate back as a separate function
Since Smaz dictionaries are meant to be global hard-coded constant objects, it makes sense to check the precondition only once, e.g. in a test suite, and not for each and every subprogram call. check-in: ec19d3153c user: nat tags: trunk | |
Changes
Changes to tools/smaz.adb.
︙ | ︙ | |||
1106 1107 1108 1109 1110 1111 1112 | is Result : Natools.Smaz_256.Dictionary := Dict; begin Natools.Smaz_Tools.Set_Dictionary_For_Trie_Search (Tools_256.To_String_List (Result)); Result.Hash := Natools.Smaz_Tools.Trie_Search'Access; | < < < < < < < < < < | < < | 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 | is Result : Natools.Smaz_256.Dictionary := Dict; begin Natools.Smaz_Tools.Set_Dictionary_For_Trie_Search (Tools_256.To_String_List (Result)); Result.Hash := Natools.Smaz_Tools.Trie_Search'Access; pragma Assert (Natools.Smaz_256.Is_Valid (Result)); return Result; end Activate_Dictionary; function Activate_Dictionary (Dict : in Natools.Smaz.Dictionary) return Natools.Smaz.Dictionary |
︙ | ︙ |