summaryrefslogtreecommitdiff
path: root/functable.h
AgeCommit message (Collapse)Author
2020-08-31Fix numerous sign-conversion warnings in compare256/compare258 andHans Kristian Rosbach
longest_match related code.
2020-08-31Rename ZLIB_INTERNAL to Z_INTERNAL for consistency.Nathan Moinvaziri
2020-08-23Add optional support for thread local storage. (#733)Nathan Moinvaziri
2020-08-21Remove return value from insert_string, since it is always ignored andHans Kristian Rosbach
quick_insert_string is being used instead.
2020-08-14Fixed many possible loss of data warnings where insert_string and ↵Nathan Moinvaziri
quick_insert_string function used on Windows.
2020-06-28Split memcopy by architecture.Nathan Moinvaziri
Use uint8_t[8] struct on big-endian machines for speed.
2020-05-30Remove IPos typedef which also helps to reduce casting warnings.Nathan Moinvaziri
2020-05-24Converted compare258 to static and convert longest_match to template.Nathan Moinvaziri
2020-05-24Abstracted out architecture specific implementations of 258 byte comparison ↵Nathan Moinvaziri
to compare258.
2020-05-01Standardize fill_window implementations and abstract out slide_hash_neon for ↵Nathan Moinvaziri
ARM.
2020-04-30Standardize insert_string functionality across architectures. Added ↵Nathan Moinvaziri
unaligned conditionally compiled code for insert_string and quick_insert_string. Unify sse42 crc32 assembly between insert_string and quick_insert_string. Modified quick_insert_string to work across architectures.
2019-09-04Add slide_hash to functable, and enable the sse2-optimized version.Hans Kristian Rosbach
Add necessary code to cmake and configure. Fix slide_hash_sse2 to compile with zlib-ng.
2018-09-17Make functable thread-local.Mika Lindqvist
2018-02-16wrap crc32 in functable (#145)Daniel Black
* wrap crc32 in functable * change internal crc32 api to use uint64_t rather than size_t for length
2017-08-17Make sure we don't export internal functionsHans Kristian Rosbach
2017-05-03Lazily initialize functable members. (#108)Mika Lindqvist
- Split functableInit() function as separate functions for each functable member, so we don't need to initialize full functable in multiple places in the zlib-ng code, or to check for NULL on every invocation. - Optimized function for each functable member is detected on first invocation and the functable item is updated for subsequent invocations. - Remove NULL check in adler32() and adler32_z() as it is no longer needed.
2017-04-24- Add adler32 to functableHans Kristian Rosbach
- Add missing call to functableinit from inflateinit - Fix external direct calls to adler32 functions without calling functableinit
2017-04-24Add a struct func_table and function functableInit.Hans Kristian Rosbach
The struct contains pointers to select functions to be used by the rest of zlib, and the init function selects what functions will be used depending on what optimizations has been compiled in and what instruction-sets are available at runtime. Tests done on a haswell cpu running minigzip -6 compression of a 40M file shows a 2.5% decrease in branches, and a 25-30% reduction in iTLB-loads. The reduction i iTLB-loads is likely mostly due to the inability to inline functions. This also causes a slight performance regression of around 1%, this might still be worth it to make it much easier to implement new optimized functions for various architectures and instruction sets. The performance penalty will get smaller for functions that get more alternative implementations to choose from, since there is no need to add more branches to every call of the function. Today insert_string has 1 branch to choose insert_string_sse or insert_string_c, but if we also add for example insert_string_sse4 then that would have needed another branch, and it would probably at some point hinder effective inlining too.