Move simple-table. to prettyprint since its generally useful and not specific to tools.time
parent
d8345b5eda
commit
22f11f24c9
|
@ -134,6 +134,20 @@ PRIVATE>
|
||||||
|
|
||||||
: pprint-cell ( obj -- ) [ pprint ] with-cell ;
|
: pprint-cell ( obj -- ) [ pprint ] with-cell ;
|
||||||
|
|
||||||
|
: simple-table. ( values -- )
|
||||||
|
standard-table-style [
|
||||||
|
[
|
||||||
|
[
|
||||||
|
[
|
||||||
|
dup string?
|
||||||
|
[ [ write ] with-cell ]
|
||||||
|
[ pprint-cell ]
|
||||||
|
if
|
||||||
|
] each
|
||||||
|
] with-row
|
||||||
|
] each
|
||||||
|
] tabular-output ;
|
||||||
|
|
||||||
GENERIC: see ( defspec -- )
|
GENERIC: see ( defspec -- )
|
||||||
|
|
||||||
: comment. ( string -- )
|
: comment. ( string -- )
|
||||||
|
|
|
@ -7,20 +7,6 @@ IN: tools.time
|
||||||
: benchmark ( quot -- runtime )
|
: benchmark ( quot -- runtime )
|
||||||
millis >r call millis r> - ; inline
|
millis >r call millis r> - ; inline
|
||||||
|
|
||||||
: simple-table. ( values -- )
|
|
||||||
standard-table-style [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
dup string?
|
|
||||||
[ [ write ] with-cell ]
|
|
||||||
[ pprint-cell ]
|
|
||||||
if
|
|
||||||
] each
|
|
||||||
] with-row
|
|
||||||
] each
|
|
||||||
] tabular-output ;
|
|
||||||
|
|
||||||
: time. ( data -- )
|
: time. ( data -- )
|
||||||
unclip
|
unclip
|
||||||
"==== RUNNING TIME" print nl pprint " ms" print nl
|
"==== RUNNING TIME" print nl pprint " ms" print nl
|
||||||
|
|
Loading…
Reference in New Issue