Hi All, I am Zoltan Herczeg, working for the Dept. of Soft. Eng., Univ. of Szeged. I am currently investigating the JavaScriptCore engine to find some speed-up solutions. During my investigation, I have encountered an interesting issue for the Garbage Collector. Namely, in the case of some sunspider benchmark programs, the GC is frequently called. For example, the runtime of 3d-cube is 121 msec, and it calls the slow Collect() function about 170 times. Thus, the garbage collecting takes the large portion of its runtime (~30%). Such benchmarks cunsume the available Number Cells in a short time, so the GC has a lot of work to reclaim these cells. My idea is to have a simple algorithm, which can reclaim many of these cells without the help of the GC. I have attached an experimental patch, and the performance-results as well. As you can see, it is a rather selective patch. Some programs benefit from it (25% performance improve for 3d-cube), while some do not (like controlflow-recursive, which does not allocate any number cells at all). Perhaps this approach could be a custom-speedup, which should be turned on, when a treshold value is reached. (Number of collects() in a given time is greater than a pre-defined value.) However, the mainloop (Machine:: PrivateExecute) should be duplicated in this case, which is not an easy task because of the computed gotos. Do you have any other idea to make this patch useful?
Regards, Zoltan
gc-improve-34737.patch
Description: Binary data
Starting sunspider-compare-results with DYLD_FRAMEWORK_PATH set to point to
built JavaScriptCore in
/home/hzoli/webkit/WebKit/WebKitBuild/Release/JavaScriptCore.
TEST COMPARISON FROM TO
DETAILS
=============================================================================
** TOTAL **: 1.014x as fast 3154.4ms +/- 0.2% 3109.8ms +/- 0.3%
significant
=============================================================================
3d: 1.102x as fast 437.2ms +/- 0.8% 396.6ms +/- 0.4%
significant
cube: 1.25x as fast 121.0ms +/- 1.8% 96.6ms +/- 0.4%
significant
morph: 1.061x as fast 188.6ms +/- 0.7% 177.7ms +/- 0.9%
significant
raytrace: 1.043x as fast 127.6ms +/- 0.8% 122.3ms +/- 0.4%
significant
access: 1.050x as fast 427.0ms +/- 0.5% 406.6ms +/- 0.5%
significant
binary-trees: *1.037x as slow* 62.4ms +/- 1.2% 64.7ms +/- 0.7%
significant
fannkuch: ?? 148.7ms +/- 0.5% 149.4ms +/- 1.1%
not conclusive: might be *1.005x as slow*
nbody: 1.158x as fast 179.2ms +/- 1.0% 154.8ms +/- 0.9%
significant
nsieve: *1.027x as slow* 36.7ms +/- 1.8% 37.7ms +/- 1.3%
significant
bitops: *1.039x as slow* 278.8ms +/- 0.4% 289.6ms +/- 0.2%
significant
3bit-bits-in-byte: *1.099x as slow* 43.6ms +/- 0.8% 47.9ms +/- 0.5%
significant
bits-in-byte: *1.019x as slow* 52.2ms +/- 0.6% 53.2ms +/- 0.6%
significant
bitwise-and: *1.015x as slow* 81.3ms +/- 0.9% 82.5ms +/- 0.6%
significant
nsieve-bits: *1.042x as slow* 101.7ms +/- 0.6% 106.0ms +/- 0.6%
significant
controlflow: *1.20x as slow* 29.3ms +/- 1.2% 35.2ms +/- 1.3%
significant
recursive: *1.20x as slow* 29.3ms +/- 1.2% 35.2ms +/- 1.3%
significant
crypto: *1.046x as slow* 191.2ms +/- 0.5% 199.9ms +/- 0.3%
significant
aes: *1.014x as slow* 70.7ms +/- 0.5% 71.7ms +/- 0.5%
significant
md5: *1.043x as slow* 62.9ms +/- 1.0% 65.6ms +/- 0.6%
significant
sha1: *1.087x as slow* 57.6ms +/- 0.9% 62.6ms +/- 1.1%
significant
date: 1.013x as fast 342.2ms +/- 0.6% 337.9ms +/- 0.7%
significant
format-tofte: 1.009x as fast 213.0ms +/- 0.5% 211.0ms +/- 0.5%
significant
format-xparb: - 129.2ms +/- 1.6% 126.9ms +/- 1.2%
math: 1.013x as fast 328.0ms +/- 0.5% 323.7ms +/- 0.9%
significant
cordic: 1.015x as fast 99.3ms +/- 1.0% 97.8ms +/- 0.5%
significant
partial-sums: - 162.1ms +/- 1.2% 159.6ms +/- 1.8%
spectral-norm: - 66.6ms +/- 0.8% 66.3ms +/- 0.7%
regexp: - 312.9ms +/- 0.2% 312.4ms +/- 0.2%
dna: - 312.9ms +/- 0.2% 312.4ms +/- 0.2%
string: - 807.8ms +/- 0.6% 807.9ms +/- 0.5%
base64: 1.042x as fast 113.7ms +/- 1.3% 109.1ms +/- 1.0%
significant
fasta: - 128.7ms +/- 1.4% 128.7ms +/- 1.5%
tagcloud: 1.005x as fast 213.8ms +/- 0.4% 212.7ms +/- 0.2%
significant
unpack-code: *1.023x as slow* 224.5ms +/- 0.8% 229.6ms +/- 0.6%
significant
validate-input: ?? 127.1ms +/- 0.9% 127.8ms +/- 1.0%
not conclusive: might be *1.006x as slow*_______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

