Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Red []
bench: function [src [string!]][
bin: to-binary src
recycle
t0: now/time/precise
out: transcode bin
now/time/precise - t0
]
b: make string! s: 1'000'000 * 20
loop 1'000'000 [append b random "abcdefghijk "]
print bench b
; print 1 + bench b ;-- this version crashes interpreter/eval-infix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment