org.mmbase.cache.implementation
Class Test

java.lang.Object
  extended by org.mmbase.cache.implementation.Test

public class Test
extends Object

Some results (at 2 x (dual core) Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz)

   michiel@mitulo:~/mmbase/head$ java org.mmbase.cache.implementation.Test 1025 1000000 50 org.mmbase.cache.implementation.LRUCache
Size 512
[+0][+1][+2][+3][+8][+6][+7][+5][+4][+9][+10][+11][+12][+13][+14][+15][+16][+17][+18][+19][+20][+21][+22][+23][+26][+27][+28][+24][+29][+30][+31][+32][+33][+34][+35][+36][+37][+38][+39][+40][+41][+42][+43][+44][+45][+46][+47][+48][+25][+49][-45][-20][-43][-41][-47][-46][-16][-4][-12][-6][-2][-15][-8][-21][-18][-22][-17][-28][-27][-26][-29][-30][-24][-13][-39][-34][-40][-42][-44][-25][-37][-1][-3][-11][-0][-49][-7][-14][-19][-48][-33][-31][-36][-5][-35][-38][-9][-23][-32][-10].
Creation 8 ns
Thread starting 147728 us
Not printed (too huge)
Run      62635 ms (62635 us/koperation,  1252 us/koperation total from 50 threads)
Used implementation: class org.mmbase.cache.implementation.LRUCache
michiel@mitulo:~/mmbase/head$ java org.mmbase.cache.implementation.Test 1025 1000000 50 org.mmbase.util.LRUHashtable
Size 512
[+0][+1][+2][+3][+4][+5][+6][+7][+8][+9][+10][+12][+13][+11][+14][+15][+16][+17][+18][+20][+19][+21][+22][+23][+24][+25][+26][+27][+28][+30][+31][+32][+33][+34][+35][+36][+37][+38][+39][+40][+41][+42][+43][+44][+45][+46][+47][+48][+49][+29][-20][-47][-42][-39][-36][-38][-27][-21][-23][-22][-16][-10][-17][-12][-8][-3][-4][-49][-48][-2][-44][-35][-43][-30][-32][-11][-34][-25][-31][-19][-33][-1][-24][-37][-0][-40][-41][-13][-9][-45][-18][-15][-7][-28][-29][-26][-46][-5][-6][-14].
Creation 8 ns
Thread starting 130541 us
Not printed (too huge)
Run      67879 ms (67879 us/koperation,  1357 us/koperation total from 50 threads)
Used implementation: class org.mmbase.util.LRUHashtable
michiel@mitulo:~/mmbase/head$ 
Conclusion: No difference. I think we can just as well use LRUCache, since it is less code.

Since:
MMBase-1.9
Version:
$Id: Test.java 41943 2010-04-16 17:18:19Z michiel $
Author:
Rico Jansen (in org.mmbase.util.LRUHashtable), Michiel Meeuwissen
See Also:
Cache

Constructor Summary
Test()
           
 
Method Summary
static void main(String[] argv)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Test

public Test()
Method Detail

main

public static void main(String[] argv)
                 throws Exception
Throws:
Exception


MMBase 2.0-SNAPSHOT - null