-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
just wanted to report some time measurements i made to test this plugin 😉
the script
Note
$env.GIT_REPOS_HOMEis where is store all my Git repos
use std [assert, bench]
let jwalk = {name: "jwalk", code: { jwalk $env.GIT_REPOS_HOME }}
let glob = {name: "glob", code: { glob $"($env.GIT_REPOS_HOME)/**" }}
print --no-newline "making sure outputs are the same... "
assert equal (do $jwalk.code | sort) (do $glob.code | sort)
print "ok"
let res = [$jwalk, $glob] | each {|it|
print $"benchmarking ($it.name)"
$it | merge (bench --rounds 10 --verbose $it.code)
}the results
jwalk and glob report the same 389505 files 👌
jwalk is quite a lot faster than glob 😏
> $res | select name mean std
#┬name─┬────────mean─────────┬───────std───────
0│jwalk│ 610ms 292µs 458ns│ 31ms 417µs 956ns
1│glob │2sec 30ms 361µs 668ns│387ms 708µs 127ns
─┴─────┴─────────────────────┴─────────────────Metadata
Metadata
Assignees
Labels
No labels