Simple fixes to reduce memory consumption. #935
+86
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As primary test was used following test-fill-array script, and bench4 script:
As additional test was used bench4 testsuite.
############### test-fill-array 1000000
qjs
init size=1000000
RSS:91452kb
njs (this patch)
init size=1000000
RSS:239024kb
njs (before this patch)
init size=1000000
RSS:607508kb
njs v0.8.9 (before "atomic patch")
init size=1000000
RSS:499816kb
############### bench4
qjs
Richards: 898
Crypto: 1060
RayTrace: 1003
NavierStokes: 1913
----
Score (version 9): 1162
RSS:6420kb
njs (this patch)
Richards: 634
Crypto: 1014
RayTrace: 501
NavierStokes: 1553
----
Score (version 9): 841
RSS:2697088kb
njs (before this patch)
Richards: 564
Crypto: 952
RayTrace: 494
NavierStokes: 1440
----
Score (version 9): 786
RSS:2830720kb
njs v0.8.9 (before "atomic patch")
Richards: 361
Crypto: 853
RayTrace: 363
NavierStokes: 1309
----
Score (version 9): 618
RSS:3026688kb
Fixes for memory consumption in flathsh will be added soon.