Merge branch 'master' of git://factorcode.org/git/factor
commit
52759fdc84
|
@ -1,43 +0,0 @@
|
||||||
|
|
||||||
USING: kernel continuations arrays assocs sequences sorting math
|
|
||||||
io io.styles prettyprint builder.util ;
|
|
||||||
|
|
||||||
IN: builder.benchmark
|
|
||||||
|
|
||||||
! : passing-benchmarks ( table -- table )
|
|
||||||
! [ second first2 number? swap number? and ] filter ;
|
|
||||||
|
|
||||||
: passing-benchmarks ( table -- table ) [ second number? ] filter ;
|
|
||||||
|
|
||||||
! : simplify-table ( table -- table ) [ first2 second 2array ] map ;
|
|
||||||
|
|
||||||
: benchmark-difference ( old-table benchmark-result -- result-diff )
|
|
||||||
first2 >r
|
|
||||||
tuck swap at
|
|
||||||
r>
|
|
||||||
swap -
|
|
||||||
2array ;
|
|
||||||
|
|
||||||
: compare-tables ( old new -- table )
|
|
||||||
[ passing-benchmarks ] bi@
|
|
||||||
[ benchmark-difference ] with map ;
|
|
||||||
|
|
||||||
: benchmark-deltas ( -- table )
|
|
||||||
"../benchmarks" "benchmarks" [ eval-file ] bi@
|
|
||||||
compare-tables
|
|
||||||
sort-values ;
|
|
||||||
|
|
||||||
: benchmark-deltas. ( deltas -- )
|
|
||||||
standard-table-style
|
|
||||||
[
|
|
||||||
[ [ "Benchmark" write ] with-cell [ "Delta (ms)" write ] with-cell ]
|
|
||||||
with-row
|
|
||||||
[ [ swap [ write ] with-cell pprint-cell ] with-row ]
|
|
||||||
assoc-each
|
|
||||||
]
|
|
||||||
tabular-output ;
|
|
||||||
|
|
||||||
: show-benchmark-deltas ( -- )
|
|
||||||
[ benchmark-deltas benchmark-deltas. ]
|
|
||||||
[ drop "Error generating benchmark deltas" . ]
|
|
||||||
recover ;
|
|
|
@ -41,12 +41,17 @@ DEFER: to-strings
|
||||||
|
|
||||||
: host-name* ( -- name ) host-name "." split first ;
|
: host-name* ( -- name ) host-name "." split first ;
|
||||||
|
|
||||||
|
! : datestamp ( -- string )
|
||||||
|
! now `{ ,[ dup timestamp-year ]
|
||||||
|
! ,[ dup timestamp-month ]
|
||||||
|
! ,[ dup timestamp-day ]
|
||||||
|
! ,[ dup timestamp-hour ]
|
||||||
|
! ,[ timestamp-minute ] }
|
||||||
|
! [ pad-00 ] map "-" join ;
|
||||||
|
|
||||||
: datestamp ( -- string )
|
: datestamp ( -- string )
|
||||||
now `{ ,[ dup timestamp-year ]
|
now
|
||||||
,[ dup timestamp-month ]
|
{ year>> month>> day>> hour>> minute>> } <arr>
|
||||||
,[ dup timestamp-day ]
|
|
||||||
,[ dup timestamp-hour ]
|
|
||||||
,[ timestamp-minute ] }
|
|
||||||
[ pad-00 ] map "-" join ;
|
[ pad-00 ] map "-" join ;
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
|
@ -23,8 +23,8 @@ TUPLE: factor-expr expr ;
|
||||||
pipeline-expr new
|
pipeline-expr new
|
||||||
over [ 1st ] [ 4th [ 1st ] map ] [ 5th ] tri suffix prefix-on >>commands
|
over [ 1st ] [ 4th [ 1st ] map ] [ 5th ] tri suffix prefix-on >>commands
|
||||||
over 2nd >>stdin
|
over 2nd >>stdin
|
||||||
over 5th >>stdout
|
over 6th >>stdout
|
||||||
swap 6th >>background ;
|
swap 7th >>background ;
|
||||||
|
|
||||||
: ast>single-quoted-expr ( ast -- obj )
|
: ast>single-quoted-expr ( ast -- obj )
|
||||||
2nd >string single-quoted-expr boa ;
|
2nd >string single-quoted-expr boa ;
|
||||||
|
|
Loading…
Reference in New Issue