Re: Speeding up matching Strings in a set



softwarepearls_com wrote:

The setup costs of any matching approach are not relevant for my
application.. because the matching will be done a huge (10^[5..7])
number of times..


Considering this and your other post (the one talking about optimizing 68k programming), have you considered JNI? How about a database with some well choosen indexes? (How big is this set here?)

For JNI, you could possibly construct the HashSet first with Java, then export the internal arrays to JNI C structs. Then write some custom code to do the quick look-up.

Similar idea with using a database: eliminate as much Java as possible and use (presumably) faster code to do the work that needs optimizing.

.



Relevant Pages

  • Re: VS.NET against JAVA
    ... Personally I found my GUI development to take 1/10th of the time when I switched from Java to C#. ... As an example, I recently found that a particular method I'd written was running slowly, and had to modify it (I'd rather not have to do the optimizing compiler's job, particularly in simple cases). ... public Bitmap CopyBitmap ... Even the silly little compilers I wrote as an undergrad could cope with that task! ...
    (microsoft.public.dotnet.general)
  • Re: OO compilers and efficiency
    ... >> Objects in Java are heap allocated, ... JVMs have mastered the art of optimizing them under these limitations. ... Indeed, I'd call manual allocation ...
    (comp.programming)
  • Re: Genetic Programming and Machine Language
    ... difficult it would be to execute a given string full of java byte code ... protected Class findClass{ ... The compiler should be optimizing away most of my code anyway. ...
    (comp.lang.java.programmer)
  • Re: jni to optimize a java application using native mathematical libraries
    ... In my lab we have used MKL ... I'm sure that those libraries are faster then any code i'll ever ... java system. ... I've tried to optimizing using code like: ...
    (comp.lang.java.programmer)
  • Re: Speeding up matching Strings in a set
    ... Considering this and your other post (the one talking about optimizing ... I have some JNI experience from many years ago, ... the performance hit to bridge the language gap was shockingly ... My Strings-in-set matching requirement doesn't fall in ...
    (comp.lang.java.programmer)