samsonjs/strftime — pull request #41 by alexandrnikitin (2014-06-18 08:31:35+00:00)
Title: Performance optimizations

Hi all,

I want to initiate a discussion/review. I've made work on performance optimization. It gives ~20x boost in tests with defined date and ~10x with current date on Node.js. http://jsperf.com/strftime-optimization
I changed the API (#29) which looks like:
```js
// by default
var strftime = require('../strftimeV2');
var strftimeLocalized = require('../strftimeV2').setLocaleTo(it_IT);
var strftimeWithCustomTimezone = require('../strftimeV2').setTimezoneTo(customTimezone);
var strftimeUTC = require('../strftimeV2').useUTC();
var strftimeLocalizedUTC = require('../strftimeV2').setLocaleTo(it_IT).useUTC();

strftime('%A');
strftimeLocalized('%A');
// etc
```

I rewrote almost all the code from scratch but it is pretty simple and easy to read. I adapted tests to new API but they need refactoring. Please spend some time to review the code. Looking forward to your feedback.