Menu

#6 Conversion.isInt() is slow and allocates unnecessarily

closed
performance (1)
1
2017-11-01
2015-08-29
Nick Briggs
No

Noticed, as we started to parse a few million records, that it was spending a lot of time in Conversion.isInt().
Turns out that it was mostly creating BigIntegers and handling exceptions when it failed.
The attached patch should speed that up, while reducing the allocation.
You're free to use it as is, or modify as you see fit.

1 Attachments

Discussion

  • Bruce Martin

    Bruce Martin - 2015-08-29

    Thanks for that, I have applied it to my code base.

    There are a lot of performance improvements that could be made.

     
  • Bruce Martin

    Bruce Martin - 2015-09-25
    • assigned_to: Bruce Martin
     
  • Bruce Martin

    Bruce Martin - 2015-09-25

    Released as part of 0.80.8f

     
  • Bruce Martin

    Bruce Martin - 2016-01-04

    This has been fixed

     
  • Bruce Martin

    Bruce Martin - 2016-01-04
    • status: open --> pending
     
  • Bruce Martin

    Bruce Martin - 2017-11-01
    • status: pending --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB