1 ! Copyright (C) 2009 Slava Pestov.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: heaps math sequences kernel ;
7 1 6000 [ 13 + 79 * 13591 mod dup ] replicate nip ;
12 [ [ dup pick heap-push ] each ]
13 [ length [ dup heap-pop* ] times ] bi
16 : heaps-benchmark ( -- )
17 100 [ heap-test ] times ;