I am trying to test some queue insertions and removal of objects timestamp. After a few test runs I have a significant speedup improvement of upto 80 times better results on the same code. This looks clearly a caching result either by JVM or the hardware\cpu cache, but I wish to get fresh results each run.
Is there a way to clear both\either of these caches programmatically from within the Java code?