manastech/crystal — pull request #151 by kostya (2014-06-27 16:11:08+00:00)
Title: add base64

in most cases faster than ruby, but with long strings slower.

```ruby
require "base64"

u = 0
s = "a" * 10_000_000
s2 = ""
s3 = ""
t1 = Time.now

10.times do
s2 = Base64.strict_encode64(s)
u += s2.length
end

t2 = Time.now

10.times do
s3 = Base64.strict_decode64(s2)
u += s3.length
end

p t2 - t1
p Time.now - t2
p u
```

crystal:
```
0.179535
0.252145
233333360
```

ruby:
```
0.152786164
0.159499939
233333360
```