benchmark: rename (run-benchmark) to run-benchmark, and run-benchmark to record-benchmark, since (run-benchmark) was actually useful on its own
parent
d5bc1ceca2
commit
cffa0c2b4f
|
@ -12,23 +12,27 @@ SYMBOL: errors
|
||||||
|
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
: (run-benchmark) ( vocab -- time )
|
: run-benchmark ( vocab -- time )
|
||||||
[ 5 ] dip '[ gc [ _ run ] benchmark ] replicate infimum ;
|
[ 5 ] dip '[ gc [ _ run ] benchmark ] replicate infimum ;
|
||||||
|
|
||||||
: run-benchmark ( vocab -- )
|
<PRIVATE
|
||||||
|
|
||||||
|
: record-benchmark ( vocab -- )
|
||||||
[ "=== " write print flush ] [
|
[ "=== " write print flush ] [
|
||||||
[ [ require ] [ (run-benchmark) ] [ ] tri timings ]
|
[ [ require ] [ (run-benchmark) ] [ ] tri timings ]
|
||||||
[ swap errors ]
|
[ swap errors ]
|
||||||
recover get set-at
|
recover get set-at
|
||||||
] bi ;
|
] bi ;
|
||||||
|
|
||||||
|
PRIVATE>
|
||||||
|
|
||||||
: run-benchmarks ( -- timings errors )
|
: run-benchmarks ( -- timings errors )
|
||||||
[
|
[
|
||||||
V{ } clone timings set
|
V{ } clone timings set
|
||||||
V{ } clone errors set
|
V{ } clone errors set
|
||||||
"benchmark" child-vocab-names
|
"benchmark" child-vocab-names
|
||||||
[ find-vocab-root ] filter
|
[ find-vocab-root ] filter
|
||||||
[ run-benchmark ] each
|
[ record-benchmark ] each
|
||||||
timings get
|
timings get
|
||||||
errors get
|
errors get
|
||||||
] with-scope ;
|
] with-scope ;
|
||||||
|
|
Loading…
Reference in New Issue