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

Re: [E-devel] Re: E CVS: proto moom



Here are my result, on a Duron 1.3Ghz:

prof1 (Jose's conversion procedures, without the null checks)
real    0m11.826s
user    0m9.945s
sys     0m0.440s

prof2 (Jose's conversion procedures, with the null checks)
real    0m12.133s
user    0m10.401s
sys     0m0.088s

prof3 (evas conversion procedures: evas_color_hsv_to_rgb() and evas_color_rgb_to_hsv())
real    0m13.743s
user    0m11.865s
sys     0m0.092s

The difference of speed between the first and the second test (with or
without the null checks) is indeed really small (2.5%).
But the diffence between the second and the third test is really more
important (13.2%). So I will move the procedures of Jose to evas, with
the null checks, and use it in Etk.

Regards ;)
Simon TRENY <MoOm>


Le Fri, 19 May 2006 10:05:12 -0500,
Brian Mattern <brian.mattern@gmail.com> a _crit :

> On Friday 19 May 2006 09:18, Enlightenment CVS wrote:
> > Enlightenment CVS committal
> >
> > Author  : moom
> > Project : e17
> > Module  : proto
> >
> > Dir     : e17/proto/etk/data/themes/default/widgets
> >
> >
> > Modified Files:
> > 	colorpicker.edc
> >
> >
> > Log Message:
> > * More work on the colorpicker, but it's still incomplete and a bit
> > buggy.
> >
> > It now uses its own optimized hsv <--> rgb conversion procedures
> > from Jose. I haven't committed them to Evas because, for
> > optimization purpose, they do not check if the params are valid.
> > Thanks Jose :)
> 
> I was curious just how much of an optimization leaving off null
> checks was, so i did a quick profile. 
> 
> Loop through all r,g,b values (0..255) and call rgb_to_hsv, then
> loop through all h,s,v values (0..360), diving s and v by 360 and
> call hsv_to_rgb
> 
> first is without null checks (as in etk)
> second adds null checks
> 
> rephorm@boru ~/code $ time ./prof  
> 
> real    0m4.521s
> user    0m4.500s
> sys     0m0.004s
> 
> rephorm@boru ~/code $ time ./prof2 
> 
> real    0m4.578s
> user    0m4.544s
> sys     0m0.008s
> 
> This is on an athlon 64 3000+
> 
> So, adding in null checks is about a 1% slowdown. Is that really
> enough to care about? (Has the added benefit of letting the functions
> work if you just need one value and don't want to create temp vars
> for the others -- e.g. rgb_to_hsv(r,g,b,h,NULL,NULL)
> 
> --
> rephorm
> 
> 
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services,
> security? Get stuff done quickly with pre-integrated technology to
> make your job easier Download IBM WebSphere Application Server
> v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________ enlightenment-devel
> mailing list enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>