Last active
May 31, 2020 20:51
-
-
Save dockimbel/6d72971079a480a555482660677ad97e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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