-
-
Save vendethiel/5165531 to your computer and use it in GitHub Desktop.
cokebench
This file contains hidden or 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
N = 999 | |
code = | |
'implicit call': 'f f ' * N + \\n | |
'soak access': 'o?.' * N + 'o\n' | |
'nested blocks': ("if #i\n" + ' ' * i for i from 1 to N)*"" + i + \\n | |
'destructuring': \[ * N + \x + \] * N + ' = a\n' | |
for desc, part in code | |
say desc | |
for name of <[coco LiveScript]> | |
let co = require name | |
say "#name #{co.VERSION}" | |
now = Date.now! | |
co.compile part | |
say Date.now! - now + \ms |
This file contains hidden or 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
implicit call | |
coco 0.9.1: 614ms | |
LiveScript 1.1.1: 644ms | |
soak access | |
coco 0.9.1: 257ms | |
LiveScript 1.1.1: 52ms | |
nested blocks | |
coco 0.9.1: 153ms | |
LiveScript 1.1.1: 84ms | |
destructuring | |
coco 0.9.1: 696ms | |
LiveScript 1.1.1: 787ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment