Skip to content

v3.0.0

Compare
Choose a tag to compare
@fb55 fb55 released this 07 Aug 22:42
· 876 commits to master since this release

entities@3.0.0 features more configurable encode and decode functions and rewritten decode & encode functions, resulting in a huge speedup.

New Features:

  • feat: Add new API for encode, decode functions 817ae67

You can now pass an object with additional configuration options to the exported encode and decode function. You can still use the relevant function directly, but this will make it easier to figure out what you want to do in the first place!

Refactors:

entities is now using tries for encoding and decoding entities. Especially when decoding, this leads to considerable performance improvements. The simple benchmark in scripts/benchmark.ts is useful for comparing the performance of these two versions:

Version decode perf encode perf escape perf
3.0.0 1.418s 6.786s 2.196s
2.2.0 4.085s 14.842s 5.166s
Speedup 2.9x 2.1x 2.4x

Heroes of this release:

  • @inikulin for his work on binary decoding tries for the parse5 project, which was the basis for the decode trie implemented in this project.
  • @mdevils for being a great opponent in entity library performance. entities was the fastest library in the space for a while. The friendly competition was a great reason to come up with smarter algorithms to push the envelope just a bit further. Now entities is on top again, but we'll see how long that lasts!