mirror of https://github.com/svaarala/duktape.git
Sami Vaarala
8 years ago
9 changed files with 83 additions and 2 deletions
@ -0,0 +1,14 @@ |
|||
define: DUK_USE_HOBJECT_ARRAY_ABANDON_LIMIT |
|||
introduced: 2.1.0 |
|||
default: 2 |
|||
tags: |
|||
- performance |
|||
- lowmemory |
|||
description: > |
|||
Abandon array part if its density is below L. The limit L is expressed as |
|||
a .3 fixed point point, e.g. 2 means 2/8 = 25%. |
|||
|
|||
The default limit is quite low: one array entry with packed duk_tval is 8 |
|||
bytes whereas one normal entry is 4+1+8 = 13 bytes without a hash entry, |
|||
and 17-21 bytes with a hash entry (load factor 0.5-1.0). So the array part |
|||
shouldn't be abandoned very easily from a footprint point of view. |
@ -0,0 +1,13 @@ |
|||
define: DUK_USE_HOBJECT_ARRAY_FAST_RESIZE_LIMIT |
|||
introduced: 2.1.0 |
|||
default: 9 |
|||
tags: |
|||
- performance |
|||
- lowmemory |
|||
description: > |
|||
Skip abandon check in object array part resize if new_size < L * old_size. |
|||
The limit L is expressed as a .3 fixed point value, e.g. 9 means 9/8 = |
|||
112.5% of current size. |
|||
|
|||
This is rather technical and you should only change the parameter if you've |
|||
looked at the internals. |
@ -0,0 +1,8 @@ |
|||
define: DUK_USE_HOBJECT_ARRAY_MINGROW_ADD |
|||
introduced: 2.1.0 |
|||
default: 16 |
|||
tags: |
|||
- performance |
|||
description: > |
|||
Technical internal parameter, see sources for details. Only adjust if |
|||
you've looked at the internals. |
@ -0,0 +1,8 @@ |
|||
define: DUK_USE_HOBJECT_ARRAY_MINGROW_DIVISOR |
|||
introduced: 2.1.0 |
|||
default: 8 |
|||
tags: |
|||
- performance |
|||
description: > |
|||
Technical internal parameter, see sources for details. Only adjust if |
|||
you've looked at the internals. |
@ -0,0 +1,8 @@ |
|||
define: DUK_USE_HOBJECT_ENTRY_MINGROW_DIVISOR |
|||
introduced: 2.1.0 |
|||
default: 8 |
|||
tags: |
|||
- performance |
|||
description: > |
|||
Technical internal parameter, see sources for details. Only adjust if |
|||
you've looked at the internals. |
@ -0,0 +1,8 @@ |
|||
define: DUK_USE_HOBJECT_ENTRY_MINGROW_ADD |
|||
introduced: 2.1.0 |
|||
default: 16 |
|||
tags: |
|||
- performance |
|||
description: > |
|||
Technical internal parameter, see sources for details. Only adjust if |
|||
you've looked at the internals. |
@ -0,0 +1,20 @@ |
|||
define: DUK_USE_HOBJECT_HASH_PROP_LIMIT |
|||
introduced: 2.1.0 |
|||
default: 8 |
|||
tags: |
|||
- performance |
|||
- lowmemory |
|||
description: > |
|||
Minimum number of properties needed for a hash part to be included in the |
|||
object property table. This limit is checked whenever an object is resized. |
|||
|
|||
A hash part improves property lookup performance even for small objects, |
|||
starting from roughly 4 properties. However, this ignores the cost of |
|||
setting up and managing the hash part, which is offset only if property |
|||
lookups made through the hash part can offset the setup cost. A hash part |
|||
is worth it for heavily accessed small objects or large objects (even those |
|||
accessed quite infrequently). The limit doesn't take into account property |
|||
access frequency, so it is necessarily a compromise. |
|||
|
|||
A lower value improves performance (a value as low a 4-8 can be useful) |
|||
while a higher value conserves memory. |
Loading…
Reference in new issue