News for hackers. Stuff that matters.

letmutex

Author here, I'm working on making it faster.

Currently, for the test page https://github.com/letmutex/htmd/blob/main/examples/page-to-..., the debug build is slower than turndown.js (~750ms vs ~670ms on my machine), the release build brings that down to ~170ms. It can definitely be faster, at least the debug build shouldn't be slower than turndown.js.

I haven't checked which parts can be improved, so I'm not sure how much time we can save after optimization.

Thanks for the information! This is really helpful, glad to know these resources for improving it.
Re:Effective substring in Rust on Tuesday June 11, 2024 @10:50AM (#40646846)
Yes, combining characters and ZWJ emojis require additional processing, just like other languages (JavaScript, Java, etc.).

https://doc.rust-lang.org/std/primitive.str.html#method.char... https://github.com/letmutex/rust-substring/blob/992b826797a5...

Re:Effective substring in Rust on Tuesday June 11, 2024 @03:22AM (#40643521)
It's 'effective' in the title, I stole it from some book names. But in the content, it should be 'efficient', thanks for pointing it out.
Re:Effective substring in Rust on Tuesday June 11, 2024 @03:18AM (#40643496)
Thanks for pointing that out, str slice is surely better. I returned String in all versions just because collect() returns A String and I want to reuse the same test function. Will update this later.