Initial commit
parent
e87d529e23
commit
9b46c35c4e
|
@ -1,8 +1,8 @@
|
|||
# Performance notes
|
||||
|
||||
Java can be (a lot) faster than what we see it with its default interpeter:
|
||||
* Initial heap size -- setting this larger than the default value will allow the ArrayList to grow more efficiently by pre-allocating a memory block from the system. The "java" command-line argument is "-Xms500m".
|
||||
* Heap and GC tuning -- we can control the ratio between the old and young generation. The "java" command-line argument is "-XX:NewRatio=1".
|
||||
Java can be (a lot) faster than what we see it with its default interpeter settings:
|
||||
* Initial heap size -- setting this larger than the default value will allow the ArrayList to grow more efficiently by pre-allocating a bigger memory block from the system. The "java" command-line argument is "-Xms500m".
|
||||
* Heap and GC tuning -- we can control the ratio between the old and young generations. The "java" command-line argument is "-XX:NewRatio=1".
|
||||
* Skip the unneeded boxing/unboxing -- this requires a more native Java implementation. See the source code of "[primes-alt.java](../primes-alt.java)".
|
||||
|
||||
Those tweaks are not included in the Java benchmark test, because I wanted to test the default languages setup. I don't aim to fine-tune any of the implementations by optimizing them for the current task/algorithm. This is a generic test, not an attempt to complete the current task in the fastest possible way for each programming language.
|
||||
These tweaks are not included in the Java benchmark test, because I wanted to test the default languages setup. I don't aim to fine-tune any of the implementations by optimizing them for the current task/algorithm. This is a generic test, not an attempt to complete the current task in the fastest possible way for each programming language.
|
||||
|
|
Loading…
Reference in New Issue