Commit Graph

9 Commits

Author SHA1 Message Date
8d316396e1 Move clock into IO. 2014-02-04 08:49:16 -08:00
ce2b45de53 Use for loop in binary_trees benchmark. 2014-01-20 13:46:37 -08:00
b979272305 Clean up text handling a bit:
- Rename IO.write -> IO.print.
- Make IO.write not print a newline.
- Support \u Unicode escapes in strings.
2014-01-05 12:27:12 -08:00
507e89d3b3 Range operators!
Added ".." and "..." infix operators. Num implements them to
return Range objects. Those in turn implement the iterator
protocol, so now numeric for loops are easy:

    for (i in 1..10) { ... }

I also cleaned up the Wren benchmarks to use this.

In the process, I discovered the method_call benchmark really
just showed loop peformance, so I unrolled the loops in all of
the languages to stress method calls.
2013-12-25 15:01:45 -08:00
6c3aa85228 Make IO a static class instead of a singleton. 2013-12-21 19:25:09 -08:00
4d67f2270a Use more conventional syntax for constructors.
They are now invoked like "new Foo".
Also, superclass constructors are now much less semantically
and syntactically weird. Since the instance is created before
any constructor is called, there's no point in time where the
instance isn't there.
2013-12-19 07:02:27 -08:00
5aaaa33552 Revise benchmarks:
- Ditch JS since it's in a different league.
- Make binary_trees and fib run faster.
- Compare using best time instead of mean.
2013-12-12 16:59:57 -08:00
eb1e5b48d6 Fix up benchmarks and add method call one. 2013-12-07 18:43:39 -08:00
edb9032052 Get binary_trees benchmark working.
Wren is actually doing well in it:

wren      mean: 1.9441 median: 1.9428 std_dev: 0.0260
lua       mean: 3.5992 median: 3.6033 std_dev: 0.0156
python    mean: 3.6667 median: 3.7097 std_dev: 0.1340
ruby      mean: 1.3941 median: 1.3914 std_dev: 0.0091
2013-11-29 16:19:13 -08:00