-
Notifications
You must be signed in to change notification settings - Fork 1
normal and memoize implementation of base64 in lua
License
scm2342/lua-base64
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a implementation of bas64encoding in plain lua. lua is, like most languages, slow in string concatination. We had a discussion about that at ccc hamburg, so we have the idea to test this encoding with a hashmap to try, if this is faster than encoding straid ahead to test performace. So already encoded 3 bytes can loaded from hashmap insteed of recoding it again (which is expensive). We tried this code on a 200kb /dev/random file and 1Mb linux c code (krypto part). The random file is slower on the memoized function - of course. But on c code, it is more than 2 times faster. Future ideas are to make it in a module and a weak hashmap to reduce memory consumtion. Happy hacking.
About
normal and memoize implementation of base64 in lua
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published