mirror of https://github.com/svaarala/duktape.git
Browse Source
- Add DUK_USE_STRHASH_SKIP_SHIFT option for the "fast" skipping hash. - Add DUK_USE_STRHASH_DENSE option (default false) to revert back to the Duktape 1.3.0 string hash algorithm.pull/432/head
Sami Vaarala
9 years ago
4 changed files with 28 additions and 0 deletions
@ -0,0 +1,10 @@ |
|||||
|
define: DUK_USE_STRHASH_DENSE |
||||
|
introduced: 1.4.0 |
||||
|
default: false |
||||
|
tags: |
||||
|
- performance |
||||
|
- sandbox |
||||
|
description: > |
||||
|
Use the slower but more dense string hash algorithm from Duktape 1.3.0 and |
||||
|
prior (based on Murmurhash2). This may be useful if you're experiencing |
||||
|
collision issues with the default hash algorithm. |
@ -0,0 +1,12 @@ |
|||||
|
define: DUK_USE_STRHASH_SKIP_SHIFT |
||||
|
introduced: 1.4.0 |
||||
|
default: 5 |
||||
|
tags: |
||||
|
- performance |
||||
|
description: > |
||||
|
Shift value to use for string hash skip offset when using the default |
||||
|
(fast) string hash. The skip offset is calculated as: |
||||
|
((length >> DUK_USE_STRHASH_SKIP_SHIFT) + 1). A higher value will be |
||||
|
slower but sample the string more densely. |
||||
|
|
||||
|
You should only change this if you run into issues with the default value. |
Loading…
Reference in new issue