Lisan

Lisan

  • Docs
  • API
  • Try it out
  • Examples
  • GitHub

›About

About

  • Lisan
  • How it works?
  • Performance
  • Lisan Compiler
  • Lisan CLI
  • Lisan Locales
  • Plugins
  • Adapters

Components

  • Translations
  • Dictionary
  • Conditional Groups
  • Formatters

Plugins

  • Localization
  • Loader

Guides & Tips

  • Pluralization
  • JSX Interpolation
  • Multiple Instances
  • Write Plugins

API

  • Lisan
  • Lisan Compiler
  • Lisan CLI
Edit

Performance

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

Benchmark Repository

See benchmark repository https://github.com/lisanjs/benchmark.

JSPerf.com

See it yourself on https://jsperf.com/lisan-vs-regex/1.

Last updated on 3/21/2020
← How it works?Lisan Compiler →
  • Benchmark.js
    • With interpolation
    • When there is no interpolation
  • Benchmark Repository
  • JSPerf.com
Lisan
Docs
AboutComponentsPluginsGuide & TipsAPI Reference
Ecosystem
LisanLisan LocalesLisan CompilerLisan CLILocalization PluginLoader PluginLisan Types
More
IssuesGitHubSupport Us