Re: Slow loadstring problem

  • From: Joshua Jensen <jjensen@xxxxxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 11 Jan 2013 08:04:34 -0700

----- Original Message -----
From: Ben Rog-Wilhelm
Date: 1/11/2013 4:48 AM
On 1/11/2013 3:37 AM, Mike Pall wrote:

Yes, that's it. The problem may appear on any Lua VM, depending on
the length and the kind of repeating patterns in the strings.


Hmm. Is there any way to avoid or mitigate the problem? Or tweak the hash function so it's less sensitive to whatever our specific pattern is? It's actually causing major issues for us.

I've reported slowdowns with a lot of strings in LuaJIT in the past. One process we have runs 2-3 times slower with LuaJIT than with Lua.

Given that our goal is to save time for our internal users, we can't use LuaJIT.

Anyway, I get that the problem may appear on any Lua VM, but it doesn't appear for our case on Lua 5.1 or 5.2. It also doesn't appear for the OP.

Is there an easy way to revert the string hash functionality back to Lua 5.1 or 5.2's? If that was done, then LuaJIT should outperform Lua 5.1 in our case.

Thanks.

Josh

Other related posts: