jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Mouawad <philippe.moua...@gmail.com>
Subject Use ThreadLocalRandom instead of Random
Date Mon, 21 Jan 2013 12:28:27 GMT
Hello,
Java 7 introduced ThreadLocalRandom which has much better performances than
using Random as static instance.
See:

http://docs.oracle.com/javase/tutorial/essential/concurrency/threadlocalrandom.html
http://niklasschlimm.blogspot.fr/2012/01/java-7-how-to-write-really-fast-java.html


Implementation is here for Java6 but can we use it with Apache License ?:
https://github.com/codahale/metrics/blob/master/metrics-core/src/main/java/com/yammer/metrics/stats/ThreadLocalRandom.java

Or should we migrate to Java 7 as Java6 will be soon EOL ?

Regards
Philippe M.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message