Re: [Vala] vala code generation too constrained?

2011-01-14 Thread Sam Liddicott
<><>___ vala-list mailing list vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list

[Vala] GObject allocation / referencing... Why is so slow?

2011-01-14 Thread Treviño
I'm doing some benchmarks with Vala, but I found that its performances aren't so great as I expected when a class is used, and mostly when it's allocated/referenced multiple times... Consider, for example, the simple example attached... The source simply allocates many TestObject's, referencing th

Re: [Vala] GObject allocation / referencing... Why is so slow?

2011-01-14 Thread Jonathan Ryan
First of all your "Objects" aren't GObjects, you need to private class TestObject : Object for them to be GObjects. The generated code is much different. On 01/14/2011 11:28 AM, Marco Trevisan (Treviño) wrote: I'm doing some benchmarks with Vala, but I found that its performances aren't so gre

Re: [Vala] GObject allocation / referencing... Why is so slow?

2011-01-14 Thread Jonathan Ryan
Second of all each iteration your object is being unreferenced. If do you a profile, ~6% of that time is being spent unreferening the object. This could also expalin the differences in time considering C#'s garbage collector does not use reference counting as does GObject, so it's problaby not

Re: [Vala] GObject allocation / referencing... Why is so slow?

2011-01-14 Thread Jonathan Ryan
You're C code doesn't use GObject, so why are you comparing it to GObject? GObject provides more functionality than your code, including thread safe reference counting, which is also taking time up in the profile. On 01/14/2011 02:25 PM, Jonathan Ryan wrote: Second of all each iteration your ob

Re: [Vala] GObject allocation / referencing... Why is so slow?

2011-01-14 Thread Jonathan Ryan
Looks like mono is calling a function called mono_new_fast, maybe this is an optimzation due to the simplicity of the code? If that's the case mono might be treating them as if you just used a struct in C, which is also a different case. Sorry for sending so many separate emails. On 01/14/2011

Re: [Vala] GObject allocation / referencing... Why is so slow?

2011-01-14 Thread Aleksander Wabik
>You're C code doesn't use GObject, so why are you comparing it to >GObject? GObject provides more functionality than your code, including >thread safe reference counting, which is also taking time up in the profile. AFAIK Gobject objects creation in Vala is using the general method of calling g

Re: [Vala] GObject allocation / referencing... Why is so slow?

2011-01-14 Thread Treviño
Il giorno ven, 14/01/2011 alle 14.17 -0500, Jonathan Ryan ha scritto: > First of all your "Objects" aren't GObjects, you need to > > private class TestObject : Object > > for them to be GObjects. The generated code is much different. Yes I know that, but I meant using the Gobject vala profile...