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>
|
||||
|
||||
: (run-benchmark) ( vocab -- time )
|
||||
: run-benchmark ( vocab -- time )
|
||||
[ 5 ] dip '[ gc [ _ run ] benchmark ] replicate infimum ;
|
||||
|
||||
: run-benchmark ( vocab -- )
|
||||
<PRIVATE
|
||||
|
||||
: record-benchmark ( vocab -- )
|
||||
[ "=== " write print flush ] [
|
||||
[ [ require ] [ (run-benchmark) ] [ ] tri timings ]
|
||||
[ swap errors ]
|
||||
recover get set-at
|
||||
] bi ;
|
||||
|
||||
PRIVATE>
|
||||
|
||||
: run-benchmarks ( -- timings errors )
|
||||
[
|
||||
V{ } clone timings set
|
||||
V{ } clone errors set
|
||||
"benchmark" child-vocab-names
|
||||
[ find-vocab-root ] filter
|
||||
[ run-benchmark ] each
|
||||
[ record-benchmark ] each
|
||||
timings get
|
||||
errors get
|
||||
] with-scope ;
|
||||
|
|
Loading…
Reference in New Issue