Skip to content

A benchmark test with Lisan

License

MIT, MIT licenses found

Licenses found

MIT
LICENCE
MIT
LICENSE
Notifications You must be signed in to change notification settings

lisanjs/benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lisan.js
i18n, Reimagined!

A blazing fast and super small i18n library for Javascript


Website

Installation · API · Guides & Tips


Lisan Benchmark test

Lisan is super fast because it doesn't interpolate strings by finding and replacing placeholders in the translation templates. Instead, it relies on template literals which are pure string concatenation functions.

In average usage, Lisan is least 25x times faster than using regex replaces. However, Lisan is at least 50x times faster when compared to the other i18n libraries and taking their complexities into account.

Benchmark.js

With interpolation

on MacBook Pro 2017, 2,8 GHz Quad-Core Intel Core i7 16 GB 2133 MHz LPDDR3

As you can predict, Lisan gets exponentially faster if number of placeholders and localization functions increase.

When there is no interpolation

Lisan is faster even on entries not containing placeholders. Because it does not perform placeholder search.

on MacBook Pro 2017, 2,8 GHz Quad-Core Intel Core i7 16 GB 2133 MHz LPDDR3

Setup

Clone the repository, and run the commands below:

npm install
npm start

After starting the server, you can visit:

Please check the developer console for the results!

License

This repository is MIT licensed.

About

A benchmark test with Lisan

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENCE
MIT
LICENSE

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages