     dup '[ _ (add-timing) ] annotate ;
 
 : word-timing. ( -- )
-    word-timing get
-    >alist [ 1,000,000,000 /f ] assoc-map sort-values
+    word-timing get >alist
+    [ second first ] sort-with
+    [ first2 first2 [ 1,000,000,000 /f ] dip 3array ] map
     simple-table. ;

<PRIVATE

: (add-timing) ( def word -- def' )
    '[ _ benchmark _ word-timing get at+ ] ;

PRIVATE>


! 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
