File tree Expand file tree Collapse file tree 4 files changed +24
-24
lines changed Expand file tree Collapse file tree 4 files changed +24
-24
lines changed Original file line number Diff line number Diff line change @@ -238,14 +238,14 @@ Caching is disabled by default.
238238
239239` css-inline ` typically inlines HTML emails within hundreds of microseconds, though results may vary with input complexity.
240240
241- Benchmarks for ` css-inline==0.13 .0 ` :
241+ Benchmarks for ` css-inline==0.14 .0 ` :
242242
243- - Basic: ** 6.29 µs** , 230 bytes
244- - Realistic-1: ** 127.72 µs** , 8.58 KB
245- - Realistic-2: ** 82.74 µs** , 4.3 KB
246- - GitHub page: ** 227.76 ms** , 1.81 MB
243+ - Basic: ** 6.72 µs** , 230 bytes
244+ - Realistic-1: ** 132.59 µs** , 8.58 KB
245+ - Realistic-2: ** 86.01 µs** , 4.3 KB
246+ - GitHub page: ** 228.97 ms** , 1.81 MB
247247
248- These benchmarks, conducted using ` rustc 1.75.0 ` , can be found in ` css-inline/benches/inliner.rs ` .
248+ These benchmarks, conducted using ` rustc 1.77.1 ` , can be found in ` css-inline/benches/inliner.rs ` .
249249
250250## Command Line Interface
251251
Original file line number Diff line number Diff line change @@ -217,15 +217,15 @@ Most of the time it achieves over a **3x** speed advantage compared to the next
217217
218218Here is the performance comparison:
219219
220- | | Size | ` css-inline 0.13 .0 ` | ` css-inline-wasm 0.13.0 ` | ` juice 10.0.0 ` | ` inline-css 4.0.2 ` |
221- | -------------| ---------| ---------------------| --------------------------| ----------------------| ----------------------|
222- | Basic | 230 B | 15.34 µs | 19.99 µs (** 1.30x ** ) | 56.70 µs (** 3.69x ** ) | 67.95 µs (** 4.42x ** ) |
223- | Realistic-1 | 8.58 KB | 333.22 µs | 434.59 µs (** 1.30x ** ) | 1.07 ms (** 3.23x ** ) | 1.24 ms (** 3.73x ** ) |
224- | Realistic-2 | 4.3 KB | 195.80 µs | 261.09 µs (** 1.33x ** ) | 0.99 ms (** 5.10x ** ) | 0.76 ms (** 3.90x ** ) |
220+ | | Size | ` css-inline 0.14 .0 ` | ` css-inline-wasm 0.13.0 ` | ` juice 10.0.0 ` | ` inline-css 4.0.2 ` |
221+ | -------------| ---------| ---------------------| --------------------------| ----------------------- | ----------------------|
222+ | Basic | 230 B | 16.82 µs | 20.92 µs (** 1.24x ** ) | 57.00 µs (** 3.38x ** ) | 68.43 µs (** 4.06x ** ) |
223+ | Realistic-1 | 8.58 KB | 351.74 µs | 452.28 µs (** 1.28x ** ) | 859.10 µs (** 2.44x ** ) | 1.04 ms (** 2.98x ** ) |
224+ | Realistic-2 | 4.3 KB | 203.25 µs | 269.54 µs (** 1.32x ** ) | 1.02 ms (** 5.04x ** ) | 861.32 µs (** 4.23x ** ) |
225225
226226The "Basic" case was obtained from benchmarking the example from the Usage section.
227227
228- The benchmarking code is available in the ` benches/bench.ts ` file. The benchmarks were conducted using the stable ` rustc 1.75.0 ` on Node.js ` v21.1.0 ` .
228+ The benchmarking code is available in the ` benches/bench.ts ` file. The benchmarks were conducted using the stable ` rustc 1.77.1 ` on Node.js ` v21.1.0 ` .
229229
230230## License
231231
Original file line number Diff line number Diff line change @@ -237,17 +237,17 @@ Most of the time it achieves over a **10x** speed advantage compared to the next
237237
238238Here is the performance comparison:
239239
240- | | Size | ` css_inline 0.13 .0 ` | ` premailer 3.10.0 ` | ` toronado 0.1.0 ` | ` inlinestyler 0.2.5 ` | ` pynliner 0.8.0 ` |
241- | -------------| ---------| ---------------------| ------------------------| ------------------------| ------------------------| ------------------------|
242- | Basic | 230 B | 6.54 µs | 126.95 µs (** 19.41x ** ) | 653.12 µs (** 99.85x ** ) | 1.02 ms (** 157.14x ** ) | 1.17ms (** 179.91x ** ) |
243- | Realistic-1 | 8.58 KB | 133.87 µs | 1.41 ms (** 10.60x ** ) | 15.85 ms (** 118.39x ** ) | 26.48 ms (** 197.86x ** ) | 51.56 ms (** 385.18x ** ) |
244- | Realistic-2 | 4.3 KB | 85.41 µs | 2.65 ms (** 31.09x ** ) | ERROR | 17.68 ms (** 207.07x ** ) | ERROR |
245- | GitHub page | 1.81 MB | 229.02 ms | 24.73 s (** 108.02x ** ) | ERROR | ERROR | ERROR |
240+ | | Size | ` css_inline 0.14 .0 ` | ` premailer 3.10.0 ` | ` toronado 0.1.0 ` | ` inlinestyler 0.2.5 ` | ` pynliner 0.8.0 ` |
241+ | -------------| ---------| ---------------------| ------------------------| ------------------------- | ------------------------| ------------------------|
242+ | Basic | 230 B | 6.79 µs | 130.25 µs (** 19.18x ** ) | 683.04 µs (** 100.58x ** ) | 1.06 ms (** 157.10x ** ) | 1.21ms (** 178.61x ** ) |
243+ | Realistic-1 | 8.58 KB | 135.37 µs | 1.40 ms (** 10.38x ** ) | 16.29 ms (** 120.37x ** ) | 26.64 ms (** 196.82x ** ) | 52.36 ms (** 386.85x ** ) |
244+ | Realistic-2 | 4.3 KB | 85.41 µs | 2.70 ms (** 31.70x ** ) | ERROR | 17.57 ms (** 205.73x ** ) | ERROR |
245+ | GitHub page | 1.81 MB | 230.63 ms | 24.32 s (** 105.45x ** ) | ERROR | ERROR | ERROR |
246246
247247The "Basic" case was obtained from benchmarking the example from the Usage section.
248248Note that the ` toronado ` , ` inlinestyler ` and ` pynliner ` libraries both encountered errors when used to inline CSS in the last scenario.
249249
250- The benchmarking code is available in the ` benches/bench.py ` file. The benchmarks were conducted using the stable ` rustc 1.75.0 ` on Python ` 3.11.7 ` .
250+ The benchmarking code is available in the ` benches/bench.py ` file. The benchmarks were conducted using the stable ` rustc 1.77.1 ` on Python ` 3.11.7 ` .
251251
252252## Comparison with other libraries
253253
Original file line number Diff line number Diff line change @@ -210,15 +210,15 @@ It consistently outperforms `premailer`, offering speed increases often exceedin
210210
211211The table below provides a detailed comparison between ` css_inline ` and ` premailer ` when inlining CSS into an HTML document (like in the Usage section above):
212212
213- | | Size | ` css_inline 0.13 .0 ` | ` premailer 1.21.0 with Nokogiri 1.15.2 ` | Difference |
213+ | | Size | ` css_inline 0.14 .0 ` | ` premailer 1.21.0 with Nokogiri 1.15.2 ` | Difference |
214214| -------------------| ---------| ---------------------| ------------------------------------------------| ------------|
215- | Basic usage | 230 B | 7.79 µs | 417.56 µs | ** 53.57x ** |
216- | Realistic email 1 | 8.58 KB | 149.56 µs | 9.73 ms | ** 65.07x ** |
217- | Realistic email 2 | 4.3 KB | 93.19 µs | Error: Cannot parse 0 calc((100% - 500px) / 2) | - |
215+ | Basic usage | 230 B | 8.82 µs | 417.84 µs | ** 47.37x ** |
216+ | Realistic email 1 | 8.58 KB | 160.37 µs | 10.15 ms | ** 63.32x ** |
217+ | Realistic email 2 | 4.3 KB | 102.88 µs | Error: Cannot parse 0 calc((100% - 500px) / 2) | - |
218218| GitHub Page | 1.81 MB | 237.03 ms | 3.02 s | ** 12.78x** |
219219
220220Please refer to the ` test/bench.rb ` file to review the benchmark code.
221- The results displayed above were measured using stable ` rustc 1.75.0 ` on Ruby ` 3.2.2 ` .
221+ The results displayed above were measured using stable ` rustc 1.77.1 ` on Ruby ` 3.2.2 ` .
222222
223223## Further reading
224224
You can’t perform that action at this time.
0 commit comments