spatchcock/quantify — pull request #33 by cblock (2012-12-19 21:10:59+00:00)
Title: Various oerformance tweaks

Hi Andrew,

quite a lot of changes in this pull request. Not sure if you're a fan of such aggregated pull request. Let me know if that's too much for your taste. The changes bascially cover the following:

- Refactored dimensions class: Instead of creating / destroying / enumerating instance variables to hold the current dimensions, a newly introduces @base_quantity_hash is used (and yes it gets updated when the dimensions change, I rewrote and renamed enumerate_base_quantities -> init_base_quantities to accomplish this job)
- Various #gsub -> gsub! replacements to avoid cloning of strings
- a benchmark test suite and a performance profiling test suite (based on profile.rb gem)
- reorganized specs into directories, introduced spec_helper and add guard and spork for faster roundtrip testing

I hope you like it.

Cheers,
Carsten