Rework duk_push_buffer and duk_to_buffer variants to call directly into a
raw helper instead of going through intermediate helper functions. This
reduces footprint and avoids one unnecessary native call.
- Add feature options to force an alternate long control transfer
(setjmp/longjmp) provider
- Default to _setjmp/_longjmp on OSX: setjmp/longjmp will save signal
mask on OSX and are significantly slower than _setjmp/_longjmp
(GH-55)
- Add an internal placeholder document for performance options, and
mention sejtmp providers there
- Update guide with a bit more expanded sections on feature options
for specific environments
Add an alternate string table algorithm with a fixed size hash table and
separate chaining with arrays. This eliminates large continuous memory
allocations for the string table structure. The remaining allocations
(for chains) are small, typically 8 to 64 bytes, and match well with other
small allocations which is convenient for a pool allocator.
The alternate string table is enabled with DUK_OPT_STRTAB_CHAIN and the
top level hash table size is given with DUK_OPT_STRTAB_CHAIN_SIZE. A good
starting point is -DDUK_OPT_STRTAB_CHAIN_SIZE=128.
As a result of this merge there are two string table algorithms (probing
and chaining), and heap pointer compressed variants of each. As a future
work item the two algorithms could be merged so that one algorithm could
serve both low memory and other environments well.
Other cleanup may be necessary as separate work items.
Add DUK_OPT_NO_STRICT_DECL as an experimental feature option to disable
processing "use strict" directives which can be useful when working with
legacy code (for instance, code that has "use strict" declarations but
has only been executed with an engine without strict mode support).