Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lisanjs/benchmark
A benchmark test with Lisan
https://github.com/lisanjs/benchmark
Last synced: 21 days ago
JSON representation
A benchmark test with Lisan
- Host: GitHub
- URL: https://github.com/lisanjs/benchmark
- Owner: lisanjs
- License: mit
- Created: 2020-03-21T18:16:10.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T22:03:32.000Z (about 2 years ago)
- Last Synced: 2023-03-07T11:16:39.810Z (almost 2 years ago)
- Language: HTML
- Size: 43.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
i18n, Reimagined!
A blazing fast and super small i18n library for Javascript
Website
Installation ·
API ·
Guides & Tips
# Lisan Benchmark test
[Lisan](https://lisanjs.com) 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:
```bash
npm install
npm start
```After starting the server, you can visit:
- http://localhost:8080/tests/with-interpolation.html
- http://localhost:8080/tests/no-interpolation.html
- http://localhost:8080/tests/time-to-interact.htmlPlease check the **developer console** for the results!
## License
This repository is [MIT licensed](./LICENCE).