Skip to content
Commit ad7dc4a4 authored by Jo-Philipp Wich's avatar Jo-Philipp Wich
Browse files

luci-base: add urldecode() and urlencode() C implementations



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: default avatarJo-Philipp Wich <jo@mein.io>
parent edd1fab3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment