testing

Spyc vs. syck: Speedier YAML parsing in PHP

This post is mostly pretty pictures. I just ran some really quick benchmarks on a couple of of the YAML parsing options available for PHP. The blue line is the Spyc YAML library. The green line is the syck PECL extension. The yellow line is a standard PHP include(), and is on the chart as a reference point.

The first two charts were tested with a fixed file size and a variable number of iterations. The final chart tracks the change in parsing time as file size increases. Each test was run with 100 iterations, and the file size was doubled at each stage.

The pretty pictures

Average parse time

Total parse time

Total parse time for larger files

More info than you cared to know

  • This is a very informal benchmark. Feel free to supplement it with testing of your own.
  • All benchmarks were run on the same Ubuntu 9.04 virtual machine running PHP 5.2.x.
  • Tests were run in a Zoop Framework skeleton app (from the upcoming Lunar release), since I had one handy and it's really easy to deploy.
  • The YAML benchmarks on the first two charts consist of loading and parsing a ~160 line file (a YAML dump of the default Zoop skeleton configuration).
  • The PHP include benchmark exists only as a reference point. It consists of loading a var_dump()'d version of the same configuration array used in the YAML tests. This file was included via a standard PHP include().
  • The first two sets of tests were run with 1, 50, 100, 250, and 500 iterations, respectively. The final test was run with 100 iterations and variable file size.

i scribbled this in the margin of a test i took the other day

a couple of hours ago i would have sworn that i knew and understood the algorithmic approach to changing the base in a difference equation. it's unfortunate that tests, while great for establishing application of a memorized algorithm, do so little to show understanding and internalization of the concepts which that regurgitated problem solving strategy actually represents.

a.k.a. no matter how much i fiddle with the terms, it appears that i have forgotten the formula :-(

80 percent ain't shabby

just finished a test that i only knew half the answers to. i guess the bonus to that is that i only took fifteen minutes to finish it. stopped to check out my score on the monitors on the way out of the testing center, and it turns out that fifteen minutes of my time (plus about ten minutes of review) was worth 80 percent. i am such a slacker.

funny thing was, there was another kid that had just spent a few hours on a chem 105 exam. and he pretty much wanted to kill himself over his score. 'specially since he spent twelve hours studying for it...

moral of the story? i'm just glad that life's not fair.

testing...

there's a point when studying for a test that you reach the maximum level of preparedness. further study is trivial, as it will not increase the odds of getting a good grade. at this point, all that's left is to wait.

i reached that point at about 9: last night. and i cant take the test until 3: this afternoon.

so i wait.

and wait.

wish me luck.

finals

free!

free as in freedom.

not free as in without cost.

i'm done. no more school this year. and i think i even passed all my finals.

farewell, cruel world.