@formatjs/icu-messageformat-parser
Advanced tools
+1
-1
| { | ||
| "name": "@formatjs/icu-messageformat-parser", | ||
| "version": "3.4.0", | ||
| "version": "3.5.0", | ||
| "license": "MIT", | ||
@@ -5,0 +5,0 @@ "type": "module", |
+22
-4
@@ -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. |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
72851
0.71%37
94.74%