[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Lua and custom memory allocators
- From: Dominic Wong <dominicw@...>
- Date: Wed, 30 Apr 2008 14:56:39 +0100
Which how are you linking to the runtime library? Make sure it's not
linking to the debug one, also I'm guessing linking statically will be
faster than linking to the dll.
This might also be of interest to you
Low fragmentation heap
http://msdn.microsoft.com/en-us/library/aa366750.aspx
However...if you're doing performance critical stuff and you need to do a
lot of allocations, then a custom allocator is usually the way to go...
-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Alex Davies
Sent: 30 April 2008 11:27
To: Lua list
Subject: Re: Lua and custom memory allocators
----- Original Message -----
From: "Abhinav Lele"
> My runtimes on :
> "for i = 1,1024*1024*64 do local z = {} end" 1m5s with lua 5.1.2
> compiled with Gnutool chain, using the default makefile on Windows
> 2003SP2 2.16Ghz Core2 box.
Interesting, seems to be three times faster then vs is on my box (amd
phenom), but still ~ 6 times slower then fastmm. Thanks.
> local z, max = {}, 1024*1024*32
> for i = 1,max do z[i] = i % 16 end
> for i = 1,max do z[i] = { z[i] } end
> for i = 1,max do
> if (z[i][1]) ~= i % 16 then error("mallocator is broken") end end
>
> doesn't run gives error: unexpected symbol near % .. did u mean some
> other operator.
Um, that should run fine on Lua 5.1. % is just the modulo symbol? Anyway the
operation is irrelevant, put anything you like in there. It was just left
over from some debugging. :)
> Is there any specific performance that you are looking ?
Nope, the allocator was out of need, the fact that it performs 20 times
faster then the default vs on my system was concerning is all. I still think
there's something funny going on, thanks again for your help.
- Alex
<<application/ms-tnef>>