Skip to content

vt-iwamoto/node-re2-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-re2-benchmark

A benchmark script for node-re2

Usage

You can run the benchmark script by the following commands.

$ docker pull vtiwamoto/node-re2-benchmark

$ docker run --rm --init vtiwamoto/node-re2-benchmark
[input]
pattern: ([a-z]+)+$
subject: aaaaaaaaaaaaaaaaaaaaaaaaaaaa!

[benchmark]
RE2: 0.192ms
RegExp: 5082.343ms

You can also pass a pattern and a subject.

$ docker run --rm --init vtiwamoto/node-re2-benchmark '(.*a){30}' 'aaaaaaaaaaaaaaaaaaaaaaaaaaaX'
[input]
pattern: (.*a){30}
subject: aaaaaaaaaaaaaaaaaaaaaaaaaaaX

[benchmark]
RE2: 0.308ms
RegExp: 4551.599ms

About

A benchmark script for node-re2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published