Skip to content

Instantly share code, notes, and snippets.

@vendethiel
Last active December 14, 2015 23:28
Show Gist options
  • Save vendethiel/5165531 to your computer and use it in GitHub Desktop.
Save vendethiel/5165531 to your computer and use it in GitHub Desktop.
cokebench
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
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