You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-59Lines changed: 13 additions & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@ Write HTML using Swift Macros.
2
2
3
3
<ahref="https://swift.org"><imgsrc="https://img.shields.io/badge/Swift-5.9+-orange"alt="Requires at least Swift 5.9"></a> <imgsrc="https://img.shields.io/badge/Platforms-Any-gold"> <ahref="https://github.com/RandomHashTags/swift-htmlkit/blob/main/LICENSE"><imgsrc="https://img.shields.io/badge/License-Apache_2.0-blue"alt="Apache 2.0 License">
4
4
5
-
-[Why?](#why)
5
+
-[Why](#why)
6
6
-[Examples](#examples)
7
7
-[Basic](#basic)
8
8
-[Advanced](#advanced)
@@ -11,10 +11,10 @@ Write HTML using Swift Macros.
11
11
-[Contributing](#contributing)
12
12
-[Funding](#funding)
13
13
14
-
## Why?
15
-
- Swift Macros are powerfuland offer performance benefits
16
-
- Alternative libraries may not fit all situations and may restrict how the html is generated/manipulated, prone to human error, or cost a constant performance overhead (middleware, rendering, result builders, etc)
17
-
- HTML macros enforce safety, can be used anywhere, and compile directly to strings which are easily manipulated
14
+
## Why
15
+
- Swift Macros are powerful, efficient and essentially removes any runtime overhead
16
+
- Alternative libraries may not fit all situations and may restrict how the html is generated, manipulated, prone to human error, or cost a constant performance overhead (middleware, rendering, result builders, etc)
17
+
- HTML macros enforce safety, can be used anywhere, and compile directly to strings
18
18
- The output is minified at no performance cost
19
19
## Examples
20
20
### Basic
@@ -160,7 +160,7 @@ Worth noting that the metrics not shown below are relatively equal to each other
160
160
Output is from executing this command: `swift package -c release benchmark --grouping metric`
161
161
162
162
<details>
163
-
<summary>Time (wall clock) [less is better] <i>[winner: swift-htmlkit by 3-15x]</i></summary>
163
+
<summary>Time (wall clock) [less is better]</summary>
164
164
165
165
```swift
166
166
Time (wall clock)
@@ -181,7 +181,7 @@ Time (wall clock)
181
181
</details>
182
182
183
183
<details>
184
-
<summary>Throughput (# / s) [more is better] <i>[winner: swift-htmlkit by 3-15x]</i></summary>
184
+
<summary>Throughput (# / s) [more is better]</summary>
185
185
186
186
```swift
187
187
Throughput (# / s)
@@ -202,7 +202,7 @@ Throughput (# / s)
202
202
</details>
203
203
204
204
<details>
205
-
<summary>Instructions [less is better] <i>[winner: swift-htmlkit by 75-637x]</i></summary>
205
+
<summary>Instructions [less is better]</summary>
206
206
207
207
```swift
208
208
Instructions
@@ -223,7 +223,7 @@ Instructions
223
223
</details>
224
224
225
225
<details>
226
-
<summary>Malloc (total) [less is better] <i>[winner: swift-htmlkit]</i></summary>
226
+
<summary>Malloc (total) [less is better]</summary>
227
227
228
228
```swift
229
229
Malloc (total)
@@ -245,7 +245,7 @@ Malloc (total)
245
245
</details>
246
246
247
247
<details>
248
-
<summary>Object allocs [less is better] <i>[winner: swift-htmlkit]</i></summary>
248
+
<summary>Object allocs [less is better]</summary>
249
249
250
250
```swift
251
251
Object allocs
@@ -267,7 +267,7 @@ Object allocs
267
267
</details>
268
268
269
269
<details>
270
-
<summary>Releases [less is better] <i>[winner: swift-htmlkit]</i></summary>
270
+
<summary>Releases [less is better]</summary>
271
271
272
272
```swift
273
273
Releases
@@ -289,7 +289,7 @@ Releases
289
289
</details>
290
290
291
291
<details>
292
-
<summary>Retains [less is better] <i>[winner: swift-htmlkit & Elementary]</i></summary>
292
+
<summary>Retains [less is better]</summary>
293
293
294
294
```swift
295
295
Retains
@@ -310,56 +310,10 @@ Retains
310
310
311
311
</details>
312
312
313
-
<details>
314
-
<summary>Time (user CPU) [less is better] <i>[winner: swift-htmlkit]</i></summary>
0 commit comments