anucssa/cssavote2 — pull request #2 by daxtens (2014-08-16 16:11:40+00:00)
Title: Use fast_secure_compare.

Turns out this does make it slightly faster.

Using ApacheBench (`ab -n 10000 -k "http://127.0.0.1:4567/admin/candidate"`), I get as per request figures:

- WEBrick, hash: 4.25ms
- WEBrick, FSC: 4.04ms
- Thin, hash: 1.75ms
- Thin, FSC: 1.05ms

Other things to note include that I'm piping stdout and stderr to `/dev/null`, and that my `AUTH_TOKEN` is 31 bytes long. I'm on a 2008 MacBook. YMMV

It's not a huge improvement and I'm perfectly OK if you don't want to include a very new native Gem in your project, but for the sake of completeness, here it is.