gem | ||
---|---|---|
Json oj | 40.4 i/s | |
MessagePack | 38.3 i/s | same |
binary json | 22.0 i/s | 1.84x slower |
Json yajl | 19.0 i/s | 2.13x slower |
ruby json | 15.6 i/s | 2.59x slower |
ruby marshal | 13.9 i/s | 2.90x slower |
ruby yaml | 0.4 i/s | 111.99x slower |
Yaml Psych | 0.4 i/s | 112.09x slower |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export MRUBY_HOME=/opt/rubies/mruby-20150906 | |
crystal run --link-flags -L${MRUBY_HOME}/lib/ hello.cr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'nokogiri' | |
src =<<EOD | |
<wrapper xmlns="ns" xmlns:extra="extra"> | |
<record xml:id="r1"> | |
<field>aaa</field> | |
<field extra:type="second">bbb</field> | |
</record> |