File tree Expand file tree Collapse file tree 3 files changed +17
-17
lines changed Expand file tree Collapse file tree 3 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -140,14 +140,14 @@ fn main() -> Result<(), css_inline::InlineError> {
140
140
141
141
` css-inline ` typically inlines HTML emails within hundreds of microseconds, though results may vary with input complexity.
142
142
143
- Benchmarks for ` css-inline==0.10.5 ` :
143
+ Benchmarks for ` css-inline==0.11.1 ` :
144
144
145
- - Basic: ** 6.40 µs** , 230 bytes
146
- - Realistic-1: ** 140.19 µs** , 8.58 KB
147
- - Realistic-2: ** 86.21 µs** , 4.3 KB
148
- - GitHub page: ** 263.33 ms** , 1.81 MB
145
+ - Basic: ** 6.60 µs** , 230 bytes
146
+ - Realistic-1: ** 134.99 µs** , 8.58 KB
147
+ - Realistic-2: ** 93.56 µs** , 4.3 KB
148
+ - GitHub page: ** 329.99 ms** , 1.81 MB
149
149
150
- These benchmarks, conducted using ` rustc 1.71.1 ` , can be found in ` css-inline/benches/inliner.rs ` .
150
+ These benchmarks, conducted using ` rustc 1.74.0 ` , can be found in ` css-inline/benches/inliner.rs ` .
151
151
152
152
## Bindings
153
153
Original file line number Diff line number Diff line change @@ -170,17 +170,17 @@ Most of the time it achieves over a **10x** speed advantage compared to the next
170
170
171
171
Here is the performance comparison:
172
172
173
- | | Size | ` css_inline 0.10.4 ` | ` premailer 3.10.0 ` | ` toronado 0.1.0 ` | ` inlinestyler 0.2.5 ` | ` pynliner 0.8.0 ` |
173
+ | | Size | ` css_inline 0.11.1 ` | ` premailer 3.10.0 ` | ` toronado 0.1.0 ` | ` inlinestyler 0.2.5 ` | ` pynliner 0.8.0 ` |
174
174
| -------------| ---------| ---------------------| -------------------------| -------------------------| -------------------------| -------------------------|
175
- | Basic | 230 B | 6.58 µs | 130.45 µs (** 19.82x ** ) | 671.87 µs (** 102.06 ** ) | 1.05 ms (** 161.00 ** ) | 1.23 ms (** 187.51x ** ) |
176
- | Realistic-1 | 8.58 KB | 146.20 µs | 1.42 ms (** 9.71x ** ) | 16.56 ms (** 113.29x ** ) | 27.45 ms (** 187.78x ** ) | 51.85 ms (** 354.66x ** ) |
177
- | Realistic-2 | 4.3 KB | 87.91 µs | 2.71 ms (** 30.90x ** ) | ERROR | 18.07 ms (** 205.64x ** ) | ERROR |
178
- | GitHub page | 1.81 MB | 262.74 ms | 25.38 s (** 96.63x ** ) | ERROR | ERROR | ERROR |
175
+ | Basic | 230 B | 6.62 µs | 127.54 µs (** 19.25x ** ) | 661.58 µs (** 99.86 ** ) | 1.04 ms (** 157.91 ** ) | 1.13 ms (** 180.99x ** ) |
176
+ | Realistic-1 | 8.58 KB | 145.58 µs | 1.47 ms (** 10.10x ** ) | 17.07 ms (** 117.26x ** ) | 28.22 ms (** 193.88x ** ) | 52.96 ms (** 363.81x ** ) |
177
+ | Realistic-2 | 4.3 KB | 94.20 µs | 2.67 ms (** 28.36x ** ) | ERROR | 17.95 ms (** 190.59x ** ) | ERROR |
178
+ | GitHub page | 1.81 MB | 338.88 ms | 25.58 s (** 75.49x ** ) | ERROR | ERROR | ERROR |
179
179
180
180
The above data was obtained from benchmarking the inlining of CSS in HTML, as described in the Usage section.
181
181
Note that the ` toronado ` , ` inlinestyler ` and ` pynliner ` libraries both encountered errors when used to inline CSS in the last scenario.
182
182
183
- The benchmarking code is available in the ` benches/bench.py ` file. The benchmarks were conducted using the stable ` rustc 1.71.1 ` on Python ` 3.11.4 ` .
183
+ The benchmarking code is available in the ` benches/bench.py ` file. The benchmarks were conducted using the stable ` rustc 1.74 ` on Python ` 3.11.6 ` .
184
184
185
185
## Comparison with other libraries
186
186
Original file line number Diff line number Diff line change @@ -137,15 +137,15 @@ It consistently outperforms `premailer`, offering speed increases often exceedin
137
137
138
138
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):
139
139
140
- | | Size | ` css_inline 0.10.4 ` | ` premailer 1.21.0 with Nokogiri 1.15.2 ` | Difference |
140
+ | | Size | ` css_inline 0.11.1 ` | ` premailer 1.21.0 with Nokogiri 1.15.2 ` | Difference |
141
141
| -------------------| ---------| ---------------------| ------------------------------------------------| ------------|
142
- | Basic usage | 230 B | 8.05 µs | 419.75 µs | ** 52.13x ** |
143
- | Realistic email 1 | 8.58 KB | 164.22 µs | 9.75 ms | ** 59.40x ** |
144
- | Realistic email 2 | 4.3 KB | 106.95 µs | Error: Cannot parse 0 calc((100% - 500px) / 2) | - |
142
+ | Basic usage | 230 B | 8.23 µs | 415.18 µs | ** 50.93x ** |
143
+ | Realistic email 1 | 8.58 KB | 162.69 µs | 10.12 ms | ** 62.21x ** |
144
+ | Realistic email 2 | 4.3 KB | 116.01 µs | Error: Cannot parse 0 calc((100% - 500px) / 2) | - |
145
145
| GitHub Page | 1.81 MB | 308.11 ms | 3.08 s | ** 9.99x** |
146
146
147
147
Please refer to the ` test/bench.rb ` file to review the benchmark code.
148
- The results displayed above were measured using stable ` rustc 1.71.1 ` on Ruby ` 3.2.2 ` .
148
+ The results displayed above were measured using stable ` rustc 1.74.0 ` on Ruby ` 3.2.2 ` .
149
149
150
150
## Ruby support
151
151
You can’t perform that action at this time.
0 commit comments