libjit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libjit] libjit about 1000 times slower than native functions


From: Aleksey Demakov
Subject: Re: [Libjit] libjit about 1000 times slower than native functions
Date: Tue, 17 Sep 2013 21:06:10 +0400

Hi,

2013/9/17 Omkar Wagh <address@hidden>:
> jit_apply (17.5%)
> jit_apply_builder_add_arguments(14.25%)
> jit_type_normalize (9%)
> jit_thread_get_control (6.5%)
> jit_type_get_param (5%)
>
> And so on...
>
> So my basic question is, am I missing something here? Does libjit work well
> for small examples or is this some constant cost that will always be added
> for any kind of libjit compiled function and it's only when the compiled
> functions get "large enough" will libjit be worth it?
>

Yes, jit_apply mechanism is slow. When calling small JIT-ted functions
from C almost all time is going to be spent switching from C to JIT
runtime rather then executing the function itself. So it's going to
perform poorly. For a more accurate idea how fast would be JITed code
it is better to benchmark a function that performs some computation
many times in a loop or recursively.

Regards,
Aleksey



reply via email to

[Prev in Thread] Current Thread [Next in Thread]