jte icon indicating copy to clipboard operation
jte copied to clipboard

Potential escaping optimization

Open agentgt opened this issue 6 months ago • 7 comments

@casid as promised I wanted to share with you some potential optimizations I found while modernizing JMustache (a runtime based Mustache engine) escaping.

https://github.com/jstachio/escape-benchmark

The benchmark just tests escaping algorithms and not full template engines.

The benchmark and algorithm of StreamEscaperBenchmark.streamSubstring2 could possibly be put in JTE. I think currently JTE is analogous to StreamEscaperBenchmark.streamCharAt but without the inner loop. JStachio I believe is closest to StreamEscaperBenchmark.streamSubstring at the moment.

Anyway feel free to close the issue or move to discussion but wanted to share the benchmark repo in case you might find it interesting.

agentgt avatar Dec 19 '23 20:12 agentgt