1 USING: kernel math math.constants msgpack sequences ;
4 : pack-sum ( seq -- n )
5 [ >msgpack msgpack> ] map-sum ;
7 : pack-sum-lengths ( seq -- n )
8 [ >msgpack msgpack> length ] map-sum ;
10 : msgpack-benchmark ( -- )
11 500,000 <iota> pack-sum 124,999,750,000 assert=
12 500,000 "hello" <repetition> pack-sum-lengths 2,500,000 assert=
13 500,000 pi <repetition> pack-sum 0x1.7f7ec53a9f04ap20 assert= ;
15 MAIN: msgpack-benchmark