luci-base: add urldecode() and urlencode() C implementations
authorJo-Philipp Wich <jo@mein.io>
Mon, 9 Apr 2018 07:47:40 +0000 (09:47 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 10 Apr 2018 09:41:32 +0000 (11:41 +0200)
The C implementations of urlencode and urldecode are considerably faster
than their current Lua counterparts.

On an AMD Geode system, the C variant is up to ten times faster when
decoding strings and up to four times faster when encoding them.

The functions are also designed to only allocate new strings when any
actual changes are required, otherwise they reuse the existing input
strings, reducing the overal memory usage somewhat.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>

No differences found