5c8452e1fca6a47ecbe71ac7f71e378b3be16ec7 |
|
27-Jun-2013 |
Elliott Hughes <enh@google.com> |
Improve Scanner performance. We really don't want to compute a new regular expression and compile it into a new Pattern every time we call nextInt (and friends). Adding a single-element cache (flushed if the Scanner's locale changes) makes this 100x faster. There still exists a pathological case where you switch back and forth between bases. Also improve the documentation to make it clearer that you really don't want to use this awful class anyway. Also bring back a few more of the tests we lost in the gingerbread timeframe. Bug: https://code.google.com/p/android/issues/detail?id=57050 Change-Id: Id6095682fb44abae2887dda29dd3d32ac777c68f
|