]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/wordtimer/wordtimer.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / extra / wordtimer / wordtimer.factor
index 9100736bda9aa4bb9898bbf71154120a15b8b1e3..7f8b57c3c31f9d70b35fcf792f4478e482b47b1d 100644 (file)
@@ -7,7 +7,7 @@ IN: wordtimer
 SYMBOL: *wordtimes*
 SYMBOL: *calling*
 
-: reset-word-timer ( -- ) 
+: reset-word-timer ( -- )
     H{ } clone *wordtimes* set-global
     H{ } clone *calling* set-global ;
 
@@ -38,7 +38,7 @@ SYMBOL: *calling*
     [ timed-call ] [ drop call ] if ; inline
 
 : (add-timer) ( word quot -- quot' )
-    [ swap time-unless-recursing ] 2curry ; 
+    [ swap time-unless-recursing ] 2curry ;
 
 : add-timer ( word -- )
     dup '[ [ _ ] dip (add-timer) ] annotate ;
@@ -59,7 +59,7 @@ SYMBOL: *calling*
     swap [ * - ] keep 2array ;
 
 : (correct-for-timing-overhead) ( timingshash -- timingshash )
-    time-dummy-word [ subtract-overhead ] curry assoc-map ;  
+    time-dummy-word [ subtract-overhead ] curry assoc-map ;
 
 : correct-for-timing-overhead ( -- )
     *wordtimes* [ (correct-for-timing-overhead) ] change-global ;
@@ -68,7 +68,7 @@ SYMBOL: *calling*
     *wordtimes* get-global [ swap suffix ] { } assoc>map natural-sort reverse pprint ;
 
 : wordtimer-call ( quot -- )
-    reset-word-timer 
+    reset-word-timer
     benchmark [
         correct-for-timing-overhead
         "total time:" write