[Marble-devel] New scanline access method

Carlos Licea carlos_licea at hotmail.com
Sat Nov 7 19:33:06 CET 2009


On Sábado 07 Noviembre 2009 02:59:55 Torsten Rahn escribió:
> Hi Carlos,
> 
> Interesting indeed (I wasn't aware of the detach).
> 
> Have you tried without changing the c-cast into a reinterprete cast?
> 
The C-style cast rules go as follows:
	The semantics for a cast-expression (aka a 'C-Style Cast') are defined as the 
	first of these that succeeds: const_cast, static_cast, static_cast followed 		
	by const_cast, reinterpret_cast, reinterpret_cast followed by const_cast. See 
	5.4 [expr.cast]
In this context the static_cast is not possible (there's no "legal" way to 
transform a bunch of uchar to a QRgb), so, what is happening is a 
reinterprete_cast. That's why the old c-style is not recommended anymore. You 
don't really know which combinations of casting are happening behind the 
scenes.

> Torsten
> 
> Am Samstag 07 November 2009 08:08:58 schrieb Carlos Licea:
> > List,
> > 	Reading through the planet I found this post:
> > 	http://zecke.blogspot.com/2009/11/collecting-hints-to-increase.html
> > 	When I checked the repository I found:
> > 	http://gitorious.org/qt-performance/qt-performance/blobs/master/performa
> >nc e- guide/qimage.xml
> > 	I immediately remembered that we use QImage::scanLine method in the
> >  ScanLine approach and sat down to try the new approach.
> > 	Here you have the patch.
> >
> > 	Short story: doesn't seem to work.
> > 	Long story: I didn't do any very deep analysis just ran marble with the
> > option --timedemo and here are the results (they are not averages of
> >  multiple runs, I just ran them a couple of times and wrote the value
> > once when I saw that I didn't have any gains):
> >
> > 				Old approach			New approach
> > Spherical			45414ms"=4.40383 fps"	58491ms"=3.41933 fps"
> > Equirectangular	58673ms"=3.40872 fps"	61583ms"=3.24765 fps"
> > Mercator			66459ms"=3.00937 fps" 	71495ms"=2.7974 fps"
> >
> > 	It's really thrilling that we not only we are not improving, but that we
> >  are having even worse performance.
> >
> > Carlos
> > PS: I couldn't CC the author of the post. I wasn't able to find his email
> > address (not that I really, really tried).
> 
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel
> 


More information about the Marble-devel mailing list