roblox-library icon indicating copy to clipboard operation
roblox-library copied to clipboard

use bit32 in base85.decode -> speed

Open idontyboi opened this issue 2 years ago • 0 comments

Hello, what you use on base85.decode looks like using math.floor to extract bits from numbers. You can use bit32.extract instead to gain some speedup (and bit32.rshift for the first byte)

BEFORE: 2.691, 2.701, 2.694, 2.706, 2.708 AFTER: 2.444, 2.436, 2.440, 2.446, 2.438

total speedup: 10.5%

Can't sumbit a PR or patch due to Public Domain requirements, though.

idontyboi avatar Aug 24 '23 18:08 idontyboi