 <PRIVATE
 
 : (add-timing) ( def word -- def' )
-    '[ _ benchmark _ word-timing get at+ ] ;
+    '[
+        _ benchmark _ word-timing get [
+            [
+                [ 0 swap [ + ] change-nth ] keep
+                [ 1 swap [ 1 + ] change-nth ] keep
+            ] [ 1 2array ] if*
+        ] change-at
+    ] ;
 
 PRIVATE>
 

    dup '[ _ (add-timing) ] annotate ;

: word-timing. ( -- )
    word-timing get
    >alist [ 1,000,000,000 /f ] assoc-map sort-values
    simple-table. ;

! Copyright (C) 2005, 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs compiler.units effects fry
generalizations generic inspector io kernel locals macros math
namespaces prettyprint quotations sequences sequences.deep
sequences.generalizations sorting summary tools.time words ;
FROM: sequences => change-nth ;
FROM: assocs => change-at ;
IN: tools.annotations

<PRIVATE
