• Tom

      This was done in java six. I didn’t realise there’d be a difference, perhaps they’ve optimised it. I’ll run it again tomorrow on 6&7 and post up a comparison.

  1. Rim

    thank you for the interesting experiments

    here the perf results with java7,
    Split: 262ms
    IndexOf: 68ms
    StringTokenizer: 122ms
    IndexOf2: 24ms
    Split: 154ms
    IndexOf: 50ms
    StringTokenizer: 96ms
    IndexOf2: 16ms
    Split: 156ms
    IndexOf: 48ms
    StringTokenizer: 98ms
    IndexOf2: 11ms

  2. Ward

    The word is spelled ‘optimized.’ I’d have thought that it was merely a typo the first time until you did it again later on.

Leave a Reply