Lucene - Core
  1. Lucene - Core
  2. LUCENE-1833

When we move to java 1.5 in 3.0 we should replace all Interger, Long, etc construction with .valueOf

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      -128 to 128 are guaranteed to be cached and using valueOf in that case is 3.5 times faster than using contructor

      1. LUCENE-1833.patch
        78 kB
        Uwe Schindler

        Issue Links

          Activity

          Mark Miller created issue -
          Hide
          Uwe Schindler added a comment -

          ...and also StringBuffers!

          Show
          Uwe Schindler added a comment - ...and also StringBuffers!
          Uwe Schindler made changes -
          Field Original Value New Value
          Link This issue is part of LUCENE-1257 [ LUCENE-1257 ]
          Uwe Schindler made changes -
          Assignee Uwe Schindler [ thetaphi ]
          Hide
          Uwe Schindler added a comment -

          This patch changes all "new Number(" code parts with "Number.valueOf(" (changed using find/sed). All tests pass.

          I want to commit this as soon as possible, because it affects lots of files and I do not want to get this patch outdated. The StringBuffer from previous comment is in another issue.

          Show
          Uwe Schindler added a comment - This patch changes all "new Number(" code parts with "Number.valueOf(" (changed using find/sed). All tests pass. I want to commit this as soon as possible, because it affects lots of files and I do not want to get this patch outdated. The StringBuffer from previous comment is in another issue.
          Uwe Schindler made changes -
          Attachment LUCENE-1833.patch [ 12421147 ]
          Hide
          Uwe Schindler added a comment -

          Committed revision: 821186

          I hope, nobody has problems with merging caused by this!

          Show
          Uwe Schindler added a comment - Committed revision: 821186 I hope, nobody has problems with merging caused by this!
          Uwe Schindler made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Hide
          Mark Miller added a comment -

          I hope, nobody has problems with merging caused by this!

          Pfff - so many good merge tools out there today, lets not let that get in the way of this sweet rapid movement to java 1.5!

          If anyone is annoyed, I'd be happy to merge any patch for them.

          Show
          Mark Miller added a comment - I hope, nobody has problems with merging caused by this! Pfff - so many good merge tools out there today, lets not let that get in the way of this sweet rapid movement to java 1.5! If anyone is annoyed, I'd be happy to merge any patch for them.
          Hide
          Robert Muir added a comment -

          Uwe, I agree with what Mark said.
          my previous comment on LUCENE-1936 really was just me wanting to stay out of your way, not the other way around

          Show
          Robert Muir added a comment - Uwe, I agree with what Mark said. my previous comment on LUCENE-1936 really was just me wanting to stay out of your way, not the other way around
          Uwe Schindler made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Mark Thomas made changes -
          Workflow jira [ 12473763 ] Default workflow, editable Closed status [ 12562994 ]
          Mark Thomas made changes -
          Workflow Default workflow, editable Closed status [ 12562994 ] jira [ 12583866 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          42d 23h 34m 1 Uwe Schindler 02/Oct/09 22:17
          Resolved Resolved Closed Closed
          53d 18h 30m 1 Uwe Schindler 25/Nov/09 16:47

            People

            • Assignee:
              Uwe Schindler
              Reporter:
              Mark Miller
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development