<><>___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list
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
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
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
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
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
>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
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...