mirror of
https://codeberg.org/icewind/php-literal-parser.git
synced 2026-06-03 18:44:07 +02:00
remove allocation for int parsing
This commit is contained in:
parent
2227135357
commit
f7ae4135d6
6 changed files with 85 additions and 18 deletions
15
benches/parse.rs
Normal file
15
benches/parse.rs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#![feature(test)]
|
||||
|
||||
extern crate test;
|
||||
|
||||
use php_literal_parser::parse;
|
||||
use test::Bencher;
|
||||
|
||||
#[bench]
|
||||
fn perf_parse_int_basic(b: &mut Bencher) {
|
||||
let input = "12345676";
|
||||
|
||||
b.iter(|| {
|
||||
assert_eq!(parse(input).unwrap(), 12345676);
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue