Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(maint) change json dep from jazz to poison #5

Merged
merged 1 commit into from
Jan 13, 2016

Conversation

jeffweiss
Copy link
Contributor

Prior to this commit, we were using Jazz as the JSON parser for the
emoji data; however, Jazz appears to abandoned and Poison has been under
active development and is the de facto JSON parsing library for many of
the high profile Elixir frameworks, like Phoenix.

Although the runtime performance should be the same since the JSON parsing happens only at compile time, I've included the results of mix bench anyway.

mix bench with Jazz:

## EmojiCharBench
variant                     100000000   0.05 µs/op
variant?                    100000000   0.06 µs/op
doublebyte?                  10000000   0.39 µs/op
render - single               1000000   1.07 µs/op
render - double               1000000   1.27 µs/op
render - variant              1000000   1.31 µs/op
chars                         1000000   2.27 µs/op
## ExmojiBench
all_with_variants           100000000   0.02 µs/op
all_doublebyte              100000000   0.02 µs/op
all                         100000000   0.02 µs/op
from_unified                 10000000   0.71 µs/op
unified_to_char - single     10000000   0.93 µs/op
unified_to_char - double      1000000   1.17 µs/op
unified_to_char - triple      1000000   1.33 µs/op
char_to_unified - single      1000000   2.35 µs/op
char_to_unified - double       500000   3.86 µs/op
codepoints                      50000   34.14 µs/op
find_by_name - none              5000   385.54 µs/op
find_by_name - many              5000   389.00 µs/op
find_by_short_name - many        5000   449.47 µs/op
find_by_short_name - none        5000   462.60 µs/op
chars                            2000   980.36 µs/op
## ScannerBench
bscan(s1)                    10000000   0.13 µs/op
bscan(s3)                    10000000   0.58 µs/op
bscan(s2)                     1000000   1.10 µs/op
bscan(s0)                     1000000   1.72 µs/op
scan(s0)                      1000000   1.88 µs/op
scan(s1)                       500000   3.64 µs/op
scan(s2)                       200000   8.09 µs/op
scan(s3)                       100000   12.19 µs/op
rscan(s1)                       50000   38.64 µs/op
rscan(s3)                       10000   289.74 µs/op
rscan(s2)                        5000   556.49 µs/op
rscan(s0)                        2000   998.57 µs/op

mix bench with Poison:

## EmojiCharBench
variant                     100000000   0.04 µs/op
variant?                    100000000   0.05 µs/op
doublebyte?                  10000000   0.37 µs/op
render - single               1000000   1.05 µs/op
render - double               1000000   1.24 µs/op
render - variant              1000000   1.28 µs/op
chars                         1000000   2.23 µs/op
## ExmojiBench
all_doublebyte              100000000   0.02 µs/op
all                         100000000   0.02 µs/op
all_with_variants           100000000   0.02 µs/op
from_unified                 10000000   0.67 µs/op
unified_to_char - single     10000000   0.93 µs/op
unified_to_char - double      1000000   1.13 µs/op
unified_to_char - triple      1000000   1.38 µs/op
char_to_unified - single      1000000   2.33 µs/op
char_to_unified - double       500000   3.80 µs/op
codepoints                      50000   33.50 µs/op
find_by_name - none              5000   382.49 µs/op
find_by_name - many              5000   395.18 µs/op
find_by_short_name - none        5000   459.22 µs/op
find_by_short_name - many        5000   493.44 µs/op
chars                            1000   1014.78 µs/op
## ScannerBench
bscan(s1)                    10000000   0.13 µs/op
bscan(s3)                    10000000   0.56 µs/op
bscan(s2)                     1000000   1.06 µs/op
bscan(s0)                     1000000   1.66 µs/op
scan(s0)                      1000000   1.82 µs/op
scan(s1)                       500000   3.56 µs/op
scan(s2)                       500000   7.75 µs/op
scan(s3)                       100000   11.57 µs/op
rscan(s1)                       50000   38.66 µs/op
rscan(s3)                       10000   303.78 µs/op
rscan(s2)                        5000   580.72 µs/op
rscan(s0)                        2000   972.93 µs/op

Prior to this commit, we were using Jazz as the JSON parser for the
emoji data; however, Jazz appears to abandoned and Poison has been under
active development and is the de facto JSON parsing library for many of
the high profile Elixir frameworks, like Phoenix.
@mroth
Copy link
Owner

mroth commented Jan 13, 2016

Appreciate this greatly! Yes, you are correct, the JSON parsing only happens at compile time (yay Elixir!).

(Longer term I'd like to try to build this data from the official Unicode Org .txt files, but there is a lot of other stuff necessary between here and there.)

mroth added a commit that referenced this pull request Jan 13, 2016
(maint) change json dep from jazz to poison
@mroth mroth merged commit 11ddd21 into mroth:master Jan 13, 2016
@jeffweiss jeffweiss deleted the change_json_dep_to_poison branch January 14, 2016 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants