diff options
author | Elliott Hughes <enh@google.com> | 2013-06-27 14:23:27 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2013-06-27 14:48:50 -0700 |
commit | 5c8452e1fca6a47ecbe71ac7f71e378b3be16ec7 (patch) | |
tree | b29cc5715e49f8870273f3338e76f710ec140c4d /dex | |
parent | a77f80f2474b0a6fdb36fea74e092f349204d07c (diff) | |
download | libcore-5c8452e1fca6a47ecbe71ac7f71e378b3be16ec7.zip libcore-5c8452e1fca6a47ecbe71ac7f71e378b3be16ec7.tar.gz libcore-5c8452e1fca6a47ecbe71ac7f71e378b3be16ec7.tar.bz2 |
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
Diffstat (limited to 'dex')
0 files changed, 0 insertions, 0 deletions