[Vala] idea for vala performance optimization



Hi all,

In vala is quite common to write lambda function especially in asyncronous
programming. Both tecnique is really usefull combined also with clouser.
(there is a dedicated paragraph "Anonymous Method / Closures" in the
official tutorial, so I think is really used a lot).

This means that the caller has to copy all the variable used by the called
function in the struct pointer passed to that.

Ok, this is the only way because the C standard does not support closures
by itself. But gcc support closure in not standard "nested functions".

https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html

so it is teorically possible to avoid to make a lot of copy.

do you think that it can be convenient to try to develop a special "vala to
c converter" for gcc to test the real speed benefit?

I don't know from where to start that, but if someone think that the idea
can really improve performance and give me some information about from
where start I can try to test something.

regards


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