Commit Graph
44 Commits
Author SHA1 Message Date
Bob Nystrom 74a7ac6b95 Update DeltaBlue to use nonlocal name. 2015-01-14 23:03:17 -08:00
Kyle Marek-Spartz 5e07c10374 Benchmark: Alert that an interpreter was not found rather than halting. 2015-01-08 09:16:32 -06:00
Bob Nystrom d53da95664 Merge pull request #76 from zeckalpha/run_bench_python3
Make run_bench compatible with Python 3
2015-01-07 07:25:46 -08:00
Kyle Marek-Spartz ed548aa659 Keep same whitespace as previous version 2015-01-06 17:57:57 -06:00
Kyle Marek-Spartz e83d01855c Make run_bench compatible with Python 3 2015-01-06 16:20:21 -06:00
Evan Shaw cb91bea6e7 Remove semi-colons from delta_blue.wren 2015-01-07 08:06:44 +13:00
Bob Nystrom 767e47bbf6 Benchmark chart. 2014-04-20 21:04:41 -07:00
Bob Nystrom 7393e12555 Allow multiple arguments to IO.print(). 2014-04-09 07:48:35 -07:00
Bob Nystrom dfe65305c3 Update delta_blue benchmark to new setter syntax. 2014-04-08 21:40:31 -07:00
Bob Nystrom da4cadf16b Unify body handling.
Blocks, functions, and methods now have the same code for handling
their bodies.

This means that single-line methods work like single-line functions:
they return the result of their expression.
2014-04-03 07:48:19 -07:00
Bob Nystrom d146018559 Convert all fns to block arg syntax. 2014-04-02 19:41:53 -07:00
Bob Nystrom a550d6cea4 Change how new operators are compiled.
Instead of an instruction that always instantiates an instance,
the "new" is compiled to a method call on the class, followed by a
method call on the (presumably) new instance.

The former lets built-in types like Fn do special stuff instead of
allocating an instance. In particular, it means:

  new Fn { ... }

can just return the block argument.
2014-04-02 17:42:30 -07:00
Bob Nystrom 4d8bf4bc8e Update benchmark to use ? and .where(). 2014-02-15 11:59:56 -08:00
Bob Nystrom 756fe0d920 Make "this" the implicit receiver! 2014-02-12 17:33:35 -08:00
Bob Nystrom 92971d1cfa Add python3 to benchmarks. 2014-02-12 17:22:42 -08:00
Bob Nystrom 8ebbba2bc0 Get delta_blue benchmark working in Wren. 2014-02-10 07:56:11 -08:00
Bob Nystrom 8d316396e1 Move clock into IO. 2014-02-04 08:49:16 -08:00
Bob Nystrom 96d728cc5d Reorganize makefile and scripts. 2014-01-23 23:29:50 -08:00
Bob Nystrom 7b1b39bd2c Clean up runtime error string handling. 2014-01-20 22:55:11 -08:00
Bob Nystrom 90d1ed6aa6 Make null falsey. 2014-01-20 18:12:55 -08:00
Bob Nystrom ce2b45de53 Use for loop in binary_trees benchmark. 2014-01-20 13:46:37 -08:00
Bob Nystrom d40d04f0c5 Include numeric loop in for benchmark. 2014-01-20 08:43:10 -08:00
Bob Nystrom 788762c970 Add LuaJIT to benchmark. 2014-01-13 07:29:47 -08:00
Bob Nystrom 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
Bob Nystrom ba0f39a5e0 Tweak README. 2013-12-25 15:03:17 -08:00
Bob Nystrom 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
Bob Nystrom e6e7b2594c For loops! 2013-12-24 21:04:11 -08:00
Bob Nystrom 6c3aa85228 Make IO a static class instead of a singleton. 2013-12-21 19:25:09 -08:00
Bob Nystrom b937597ea7 Make benchmarks score based instead of time based. 2013-12-20 07:04:04 -08:00
Bob Nystrom 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
Bob Nystrom e7cf8ffe2e Make method_call benchmark use inheritance.
This also fixes a bug where constructors weren't being bound
correctly, and eliminates some unneeded instructions when
compiling ifs.

I also tweaked the other method_call languages to match Wren's.
Since Wren needs to do a super call to get to the parent _count,
the other languages do now too.

This is nice too because it means we're benchmarking super 
calls.
2013-12-18 07:37:41 -08:00
Bob Nystrom 7fe60499db Get rid of my name from TODOs. Anyone can do them. 2013-12-14 15:28:18 -08:00
Bob Nystrom 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
Bob Nystrom 71c26c6d89 Add support for just control which language benchmarks are run. 2013-12-10 23:02:24 -08:00
Bob Nystrom 1e2449893e Add baseline comparison to benchmark script.
This way, I can track performance improvements and regressions.
2013-12-07 22:15:25 -08:00
Bob Nystrom eb1e5b48d6 Fix up benchmarks and add method call one. 2013-12-07 18:43:39 -08:00
Bob Nystrom 74c414937c Add JS version of binary tree benchmark. 2013-11-29 20:25:00 -08:00
Bob Nystrom 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
Bob Nystrom af694053a5 Add JavaScript to benchmark runner. 2013-11-26 07:50:12 -08:00
Bob Nystrom e3e1f7f3d4 Start working on string escapes. 2013-11-23 21:00:47 -08:00
Bob Nystrom e4b5613780 ASCII art graph of benchmark results! 2013-11-22 09:17:45 -08:00
Bob Nystrom b30c30e1e3 Get a basic benchmark runner going. 2013-11-22 08:55:22 -08:00
Bob Nystrom 64509a4f61 NaN tagging!
This plus moving some variables into locals in the interpreter loop
gets the fib benchmark within 25% of Lua!
2013-11-17 14:20:15 -08:00
Bob Nystrom 1266578a4e Add trivial fib benchmark. 2013-11-14 20:57:56 -08:00