Skip to content

Commit 1fdda04

Browse files
committed
docs: Update benchmarks
1 parent c80a665 commit 1fdda04

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ fn main() -> css_inline::Result<()> {
181181

182182
`css-inline` typically inlines HTML emails within hundreds of microseconds, though results may vary with input complexity.
183183

184-
Benchmarks for `css-inline==0.12.0`:
184+
Benchmarks for `css-inline==0.13.0`:
185185

186-
- Basic: **6.51 µs**, 230 bytes
187-
- Realistic-1: **137.91 µs**, 8.58 KB
188-
- Realistic-2: **87.85 µs**, 4.3 KB
189-
- GitHub page: **265.26 ms**, 1.81 MB
186+
- Basic: **6.29 µs**, 230 bytes
187+
- Realistic-1: **127.72 µs**, 8.58 KB
188+
- Realistic-2: **82.74 µs**, 4.3 KB
189+
- GitHub page: **227.76 ms**, 1.81 MB
190190

191-
These benchmarks, conducted using `rustc 1.74.1`, can be found in `css-inline/benches/inliner.rs`.
191+
These benchmarks, conducted using `rustc 1.75.0`, can be found in `css-inline/benches/inliner.rs`.
192192

193193
## Command Line Interface
194194

bindings/javascript/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,19 +153,19 @@ Such tags will be kept in the resulting HTML even if the `keep_style_tags` optio
153153
## Performance
154154

155155
`css-inline` is powered by efficient tooling from Mozilla's Servo project and significantly outperforms other JavaScript alternatives in terms of speed.
156-
Most of the time it achieves over a **4x** speed advantage compared to the next fastest alternative.
156+
Most of the time it achieves over a **3x** speed advantage compared to the next fastest alternative.
157157

158158
Here is the performance comparison:
159159

160-
| | Size | `css-inline 0.12.0` | `css-inline-wasm 0.12.0` | `juice 10.0.0` | `inline-css 4.0.2` |
161-
|-------------|---------|---------------------|--------------------------|-----------------------|------------------------|
162-
| Basic | 230 B | 15.06 µs | 29.33 µs (**1.94x**) | 142.53 µs (**9.46x**) | 163.77 µs (**10.87x**) |
163-
| Realistic-1 | 8.58 KB | 320.71 µs | 638.97 µs (**1.99x**) | 1.28 ms (**4.01x**) | 1.87 ms (**5.85x**) |
164-
| Realistic-2 | 4.3 KB | 205.21 µs | 385.20 µs (**1.87x**) | 1.72 ms (**8.42x**) | 1.56 ms (**7.63x**) |
160+
| | Size | `css-inline 0.13.0` | `css-inline-wasm 0.13.0` | `juice 10.0.0` | `inline-css 4.0.2` |
161+
|-------------|---------|---------------------|--------------------------|----------------------|----------------------|
162+
| Basic | 230 B | 15.34 µs | 19.99 µs (**1.30x**) | 56.70 µs (**3.69x**) | 67.95 µs (**4.42x**) |
163+
| Realistic-1 | 8.58 KB | 333.22 µs | 434.59 µs (**1.30x**) | 1.07 ms (**3.23x**) | 1.24 ms (**3.73x**) |
164+
| Realistic-2 | 4.3 KB | 195.80 µs | 261.09 µs (**1.33x**) | 0.99 ms (**5.10x**) | 0.76 ms (**3.90x**) |
165165

166166
The "Basic" case was obtained from benchmarking the example from the Usage section.
167167

168-
The benchmarking code is available in the `benches/bench.ts` file. The benchmarks were conducted using the stable `rustc 1.74.1` on Node.js `v21.4.0`.
168+
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`.
169169

170170
## License
171171

bindings/python/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,17 @@ Most of the time it achieves over a **10x** speed advantage compared to the next
190190

191191
Here is the performance comparison:
192192

193-
| | Size | `css_inline 0.12.0` | `premailer 3.10.0` | `toronado 0.1.0` | `inlinestyler 0.2.5` | `pynliner 0.8.0` |
193+
| | Size | `css_inline 0.13.0` | `premailer 3.10.0` | `toronado 0.1.0` | `inlinestyler 0.2.5` | `pynliner 0.8.0` |
194194
|-------------|---------|---------------------|------------------------|------------------------|------------------------|------------------------|
195-
| Basic | 230 B | 6.75 µs | 131.50 µs (**19.48x**) | 666.20 µs (**98.70x**) | 1.05 ms (**155.82x**) | 1.20 ms (**178.63x**) |
196-
| Realistic-1 | 8.58 KB | 138.79 µs | 1.43 ms (**10.34x**) | 16.52 ms (**119.07x**) | 27.59 ms (**198.85x**) | 51.74 ms (**372.84x**) |
197-
| Realistic-2 | 4.3 KB | 86.95 µs | 2.69 ms (**31.03x**) | ERROR | 18.06 ms (**207.76x**) | ERROR |
198-
| GitHub page | 1.81 MB | 338.88 ms | 25.58 s (**75.49x**) | ERROR | ERROR | ERROR |
195+
| 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**) |
196+
| 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**) |
197+
| Realistic-2 | 4.3 KB | 85.41 µs | 2.65 ms (**31.09x**) | ERROR | 17.68 ms (**207.07x**) | ERROR |
198+
| GitHub page | 1.81 MB | 229.02 ms | 24.73 s (**108.02x**) | ERROR | ERROR | ERROR |
199199

200200
The "Basic" case was obtained from benchmarking the example from the Usage section.
201201
Note that the `toronado`, `inlinestyler` and `pynliner` libraries both encountered errors when used to inline CSS in the last scenario.
202202

203-
The benchmarking code is available in the `benches/bench.py` file. The benchmarks were conducted using the stable `rustc 1.74.1` on Python `3.11.6`.
203+
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`.
204204

205205
## Comparison with other libraries
206206

bindings/ruby/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ It consistently outperforms `premailer`, offering speed increases often exceedin
157157

158158
The table below provides a detailed comparison between `css_inline` and `premailer` when inlining CSS into an HTML document (like in the Usage section above):
159159

160-
| | Size | `css_inline 0.12.0` | `premailer 1.21.0 with Nokogiri 1.15.2` | Difference |
160+
| | Size | `css_inline 0.13.0` | `premailer 1.21.0 with Nokogiri 1.15.2` | Difference |
161161
|-------------------|---------|---------------------|------------------------------------------------|------------|
162-
| Basic usage | 230 B | 8.27 µs | 433.55 µs | **52.35x** |
163-
| Realistic email 1 | 8.58 KB | 159.20 µs | 9.88 ms | **62.10x** |
164-
| Realistic email 2 | 4.3 KB | 103.41 µs | Error: Cannot parse 0 calc((100% - 500px) / 2) | - |
165-
| GitHub Page | 1.81 MB | 301.66 ms | 3.08 s | **10.24x** |
162+
| Basic usage | 230 B | 7.79 µs | 417.56 µs | **53.57x** |
163+
| Realistic email 1 | 8.58 KB | 149.56 µs | 9.73 ms | **65.07x** |
164+
| Realistic email 2 | 4.3 KB | 93.19 µs | Error: Cannot parse 0 calc((100% - 500px) / 2) | - |
165+
| GitHub Page | 1.81 MB | 237.03 ms | 3.02 s | **12.78x** |
166166

167167
Please refer to the `test/bench.rb` file to review the benchmark code.
168-
The results displayed above were measured using stable `rustc 1.74.1` on Ruby `3.2.2`.
168+
The results displayed above were measured using stable `rustc 1.75.0` on Ruby `3.2.2`.
169169

170170
## Further reading
171171

0 commit comments

Comments
 (0)