Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@formatjs/icu-messageformat-parser

Package Overview
Dependencies
Maintainers
3
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formatjs/icu-messageformat-parser - npm Package Compare versions

Comparing version
3.4.0
to
3.5.0
+1
-1
package.json
{
"name": "@formatjs/icu-messageformat-parser",
"version": "3.4.0",
"version": "3.5.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "type": "module",

@@ -7,2 +7,6 @@ # MessageFormat Parser

## Benchmarks
### JavaScript/TypeScript Parser
```

@@ -15,6 +19,20 @@ $ bazel run //packages/icu-messageformat-parser/benchmark:benchmark

complex_msg x 58,910 ops/sec ±0.33%
normal_msg x 405,440 ops/sec ±0.53%
simple_msg x 2,592,098 ops/sec ±0.44%
string_msg x 4,511,129 ops/sec ±2.22%
complex_msg: 23.85 µs (41,931 ops/sec)
normal_msg: 3.27 µs (306,177 ops/sec)
simple_msg: 0.60 µs (1,675,766 ops/sec)
string_msg: 0.32 µs (3,113,287 ops/sec)
```
### Rust Parser (WASM)
The Rust parser (optimized build) is **2.6-3.7x faster** than the JavaScript parser:
```
$ bazel run -c opt //crates/icu_messageformat_parser:comparison_bench
complex_msg: 9.22 µs (2.59x faster than JS)
normal_msg: 1.14 µs (2.87x faster than JS)
simple_msg: 163 ns (3.68x faster than JS)
string_msg: 118 ns (2.71x faster than JS)
```
The Rust parser is also 10-11% faster than the SWC ICU MessageFormat parser.