15 Commits (10cca7b69ddd8bc268681a2506c5c01b26b08311)

Author SHA1 Message Date
David Majda f0eab4728a Use Unicode box-drawing characters for command-line benchmark table
Hopefully this works reasonably in all environments where Node.js runs.
13 years ago
David Majda 17c1531068 Make "Avg. time" column in the commmand-line benchmark table wider 13 years ago
David Majda a042f78558 Fix unit in command-line benchmark runner 13 years ago
David Majda 918dcf6ed2 Test and benchmark command-line runners can be run from any directory 13 years ago
David Majda 8f005c027b Fix encoding in |fs.readFileSync| calls ("utf-8" -> "utf8") 13 years ago
David Majda 8e63ad3b6c Add command-line runner for the benchmark suite 13 years ago
David Majda a091cb2ffd Factor out parts of benchmarks unrelated to running in the browser 13 years ago
David Majda 5ab36f8018 Split the vendor directory
There are now three vendor directories. The goal is to have test- and
benchmark-specific stuff is its own directories and not in the main one.

  vendor
  test/vendor
  benchmark/vendor
14 years ago
David Majda e59f3ba338 Split the source code into several files, introduce build system
The source code is now in the src directory. The library needs to be
built using "rake", which creates the lib/peg.js file by combining the
source files.
14 years ago
David Majda c3b5c2131a Benchmark: Factor benchmark into several functions run using |setTimeout|
We do this for two reasons:

  1. To avoid bowser mechanism for interrupting long-running scripts to
     kick-in (or at least to not kick-in that often).

  2. To ensure progressive rendering of results in the browser (some
     browsers do not render at all when running JavaScript code).

This does not change the benchmark suite execution speed statistically
significantly on V8.

Detailed results (benchmark suite totals):

---------------------------------
 Test #     Before       After
---------------------------------
      1   31.04 kB/s   31.18 kB/s
      2   31.26 kB/s   30.89 kB/s
      3   31.15 kB/s   31.19 kB/s
      4   30.52 kB/s   31.21 kB/s
      5   31.00 kB/s   30.73 kB/s
---------------------------------
Average   30.99 kB/s   31.04 kB/s
---------------------------------

Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4
14 years ago
David Majda 647e7be1fd Benchmark: Users can specify the number of runs 14 years ago
David Majda 4cae3f9b48 Benchmark: Make results table fixed-width, center everything 14 years ago
David Majda 28459236aa Removed trailing comma that caused error in IE. 14 years ago
David Majda e63f64a3d5 Make the generated parsers standalone (no runtime is required).
This and also speeds up the benchmark suite execution by 7.83 % on V8.

Detailed results (benchmark suite totals):

---------------------------------
 Test #     Before       After
---------------------------------
      1   26.17 kB/s   28.16 kB/s
      2   26.05 kB/s   28.16 kB/s
      3   25.99 kB/s   28.10 kB/s
      4   26.13 kB/s   28.11 kB/s
      5   26.14 kB/s   28.07 kB/s
---------------------------------
Average   26.10 kB/s   28.14 kB/s
---------------------------------

Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.7 Safari/533.2
14 years ago
David Majda cfd46b622a Added a benchmark suite. 14 years ago