about summary refs log tree commit diff
path: root/src/rt/rust_kernel.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-07-12 03:46:41 -0700
committerbors <bors@rust-lang.org>2013-07-12 03:46:41 -0700
commitf67935257b19b0904b282c949770d85089fdcf3c (patch)
treea3390ee1fa12d5ee8ccd384437feeb96155d82ff /src/rt/rust_kernel.cpp
parentd56c9762a363abb5e98f31e43381005863414795 (diff)
parent8926b31088bdb04d1fa772afa0a7dcbc13b38c1f (diff)
downloadrust-f67935257b19b0904b282c949770d85089fdcf3c.tar.gz
rust-f67935257b19b0904b282c949770d85089fdcf3c.zip
auto merge of #7696 : glinscott/rust/utf8_perf, r=cmr
Moves multibyte code to it's own function to make char_range_at
easier to inline, and faster for single and multibyte chars.

Benchmarked reading example.json 100 times, 1.18s before, 1.08s
after.

Also, optimize str::is_utf8 for the single and multibyte case
Before:
is_utf8_ascii:          272.355162 ms
is_utf8_multibyte:      167.337334 ms

After:
is_utf8_ascii:          218.088049 ms
is_utf8_multibyte:      134.836722 ms
Diffstat (limited to 'src/rt/rust_kernel.cpp')
0 files changed, 0 insertions, 0 deletions