Releases: mroth/emoji_data.rb
v0.2.0
-
Rename a number of methods to be clearer and more consistent with that they
actually do:EmojiChar.char()
→EmojiChar.render()
EmojiData.find_by_unified()
→EmojiData.from_unified()
EmojiData.find_by_str()
→EmojiData.scan()
Don't worry, the old names are still aliased in so you don't have to change
anything in your existing code. This change is make things clearer for
people new to the library. -
Add new
.from_short_name()
library method for fast keyword lookups. -
DEVELOPERS: Internal code cleanup and better comments.
-
DEVELOPERS: Add benchmark suite for comparing method implementation time
across versions of this library.
v0.1.0
- Add support for Unicode variant encodings, used by MacOSX 10.9 / iOS 7.
- For more info: http://www.unicode.org/L2/L2011/11438-emoji-var.pdf
- By default,
EmojiChar.to_s()
and.char()
will now use the variant encoding.
- With adding support for variants, the speed of
find_by_str
regressed by approximately 20% (because there are more codepoints to match against). To counter this, we switched to a Regex based scan than improves performance of the method by over 250x(!). A complete sorted search against 1000 strings now takes ~2ms where before it would take around a half second. - Import latest version of iamcal/emoji-data.
- 100% test coverage. 😎
v0.0.3
On initialization, create hashmaps to cache lookups for .find_by_unified()
.
In a quick benchmark in MRI 2.1.1, this reduces the time needed for one million lookups from 13.5s
to 0.3s
!
This is only for lookup by unified ID for now, since the other find_by_*()
methods are actually searches that can return multiple values. I'll look at nested hashmaps for those if there is a pressing performance need later.
v0.0.2
v0.0.1pre1
Version 0.0.1pre1