Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


performance of java algorithm

Mr Magoo
  • Mr Magoo
    Mr Magoo

    The front pages states a throughput of 10000/sec but when I tried this myself I got the following results:
    count: 0 time: 0 secs
    count: 1000 time: 6 secs
    count: 2000 time: 13 secs
    count: 3000 time: 20 secs
    count: 4000 time: 27 secs
    count: 5000 time: 34 secs
    count: 6000 time: 40 secs
    count: 7000 time: 47 secs
    count: 8000 time: 53 secs
    count: 9000 time: 60 secs
    final time for 10,000: 67 secs

    Is the java matcher that inefficient compared to C#??

  • Robert Važan
    Robert Važan


    First make sure you are using the identify() method, not verify(). The former is faster than the latter. Also make sure you are following my recommendations on proper benchmarking technique that I have described in another thread:


    If you are already using identify() and following all the recommendations, I have to conclude these results are likely due to inefficiencies in the java port. Java port speed is not regularly benchmarked. The code contains a lot of places where optimizations would be desirable. Multi-threading is disabled in java port. I wouldn't be surprised if these results turned out to be representative.

    Kind Regards,