Am 31.12.2012 13:12, schrieb Uli Schlachter:
> Hi,
>
> On 31.12.2012 12:48, Uli Schlachter wrote:
> [...]
>> This seems to be overhead due to function
>> calls through LGI (C profilers blame lua code, lua profiler blame LGI's
>> component.lua AFAIR).
> [...]
>
> On second thought, let's not blame LGI too early. I am really unsure about
> what
> is causing this.
>
> Uli
>
> P.S.:
> $ time lua -e 'l = require"lgi" ; c = l.cairo ; s = c.ImageSurface("ARGB32",
> 10,
> 10) ; r = c.Context(s) ; for s=1, 10000 do r:rectangle(1, 2, 3, 4) end'
>
> real 0m0.178s
> user 0m0.164s
> sys 0m0.004s
>
> (That means about 16.7 microseconds per call which is not that much, but
> obviously slower than C (0.3 microseconds per call, factor 55))
>
Could the new signal handling be responsible?
for i = 0, 1000 do
local t = timer { timeout = 3}
t:connect_signal("timeout", function() end)
t:start()
end
Maybe someone could compare this with the old version.
signature.asc
Description: OpenPGP digital signature
