Fact of the matter is that macros are computed at compile time, which offer significant performance improvement/efficiency over existing runtime-based html methods.
Comparing the two libraries, the macro implementation is 100x more efficient. *I haven't tested it against Vapor's HTMLKit or Leaf, but they don't use macros, so they're probably slower too
I haven't considered using StaticString, but I would assume it should offer a slight performance improvement. However it is worth noting that if you want to manipulate the compiled html during runtime you would need to convert it to a string manually. If I do go that approach I'll add some convenience logic to convert it easily.
A limitation right now is the implementation needs to do some string interpolation, which is not allowed for a StaticString, when assigning attributes with an enum value type or interpolated value. I am actively researching & testing workarounds.
Thanks so much for making this @sliemeobn, I also think that full stack Swift server apps with HTMX are a great way to get there. Whilst Swift Macros are powerful and seem like they could further increase performance (eventually though it could be negligible depending on the library usage), having a package with zero dependencies is priceless. Adding a small sponsorship for encouragement to keep going