Commit acf7ecf
committed
Add XPath
## Benchmark (Comparison with rexml 3.4.1)
```
$ benchmark-driver benchmark/xpath.yaml
Calculating -------------------------------------
rexml 3.4.1 master 3.4.1(YJIT) master(YJIT)
REXML::XPath.match(REXML::Document.new(xml), 'a//a') 29.188 231.526 108.652 496.039 i/s - 100.000 times in 3.426101s 0.431917s 0.920370s 0.201597s
REXML::XPath.match([REXML::Document.new(xml), REXML::Document.new(xml)], 'a//a') 13.424 233.667 43.762 495.931 i/s - 100.000 times in 7.449274s 0.427960s 2.285062s 0.201641s
Comparison:
REXML::XPath.match(REXML::Document.new(xml), 'a//a')
master(YJIT): 496.0 i/s
master: 231.5 i/s - 2.14x slower
3.4.1(YJIT): 108.7 i/s - 4.57x slower
rexml 3.4.1: 29.2 i/s - 16.99x slower
REXML::XPath.match([REXML::Document.new(xml), REXML::Document.new(xml)], 'a//a')
master(YJIT): 495.9 i/s
master: 233.7 i/s - 2.12x slower
3.4.1(YJIT): 43.8 i/s - 11.33x slower
rexml 3.4.1: 13.4 i/s - 36.94x slower
```
- YJIT=ON : 4.57x - 11.33x faster
- YJIT=OFF : 7.93x - 17.41 fastera//a Benchmark1 parent 93a46eb commit acf7ecf
1 file changed
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments