You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #132 - emilio:numeric-faster, r=SimonSapin
Numeric faster
The following commit:
* Removes char logic from consume_numeric.
* Rearranges exponent parsing to look at one char in the common case
(presumably not a big deal).
This makes the benchmark added in the first commit go from:
test tests::numeric ... bench: 48,221,308 ns/iter (+/- 3,356,881)
to:
test tests::numeric ... bench: 43,656,802 ns/iter (+/- 1,323,570)
on my machine.
Which is pretty much a micro-optimization, but perhaps it's worth given how
common these values are.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-cssparser/132)
<!-- Reviewable:end -->
0 commit comments