brianmario / escape_utils

Faster string escaping routines for your ruby apps
MIT License
513 stars 52 forks source link

EscapeUtils.html_escape performance #26

Closed tmm1 closed 11 years ago

tmm1 commented 11 years ago

This removes all allocations and copies in the special case where the target string requires no escaping. The original ruby string is returned to the caller.

/cc @vmg @scottjg @tnm @rtomayko @github/systems

vmg commented 11 years ago

Man, I've just noticed how fucking awful the buffer code in escape_utils is. Let me port this PR with new buffer code.