module Benchmarks

Included Modules

Extended Modules

Defined in:

benchmarks.cr

Constant Summary

FAST_INPUT = fast_input(35)
SLOW_INPUT = "\nlet fibonacci = fn(x) {\n\tif (x == 0) {\n\t\treturn 0;\n\t} else {\n\t\tif (x == 1) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\tfibonacci(x - 1) + fibonacci(x - 2);\n\t\t}\n\t}\n};\nfibonacci(35);"

Instance Method Summary

Instance methods inherited from module Code

lookup(op : Opcode) : Definition lookup, make(op : Opcode) : Instructions
make(op : Opcode, *operands : Int32) : Instructions
make
, onset(ins : Instructions, i : Int32) : Instructions onset, read_byte(ins : Instructions, i : Int32) : UInt8 read_byte, read_int(ins : Instructions, i : Int32) : Int32 read_int

Instance methods inherited from module Evaluator

eval(program : Program, env : Environment) : MObject | Nil eval

Instance Method Detail

def crystal(x : Int32) #

[View source]
def eval(input : String) #

[View source]
def fast_input(size : Int32) #

[View source]
def vm(input : String) #

[View source]