POV-Ray : Newsgroups : povray.off-topic : This is great Server Time
5 Sep 2024 19:23:36 EDT (-0400)
  This is great (Message 41 to 50 of 94)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: clipka
Subject: Re: This is great
Date: 22 Aug 2009 01:32:11
Message: <4a8f82db@news.povray.org>
Invisible schrieb:
>  From what I've seen, only games programmers go to the extremes of using 
> obscure and elaborate low-level hackery to squeeze every last 
> femtosecond of performance out of the machine.

Those, and embedded software developers.


Post a reply to this message

From: clipka
Subject: Re: This is great
Date: 22 Aug 2009 01:36:31
Message: <4a8f83df@news.povray.org>
Warp schrieb:
>   Well, sometimes it is useful to be able to poke at memory directly.
> For example, changing the sign of a floating point value is much faster
> by flipping that one bit at the end of it than doing it with the FPU.
> (Of course after this little trick your program will assume IEEE floating
> point numbers. But for many purposes that suffices.)

I would think that a good optimizing compiler would translate something 
like "x = -x;" to equally efficient code...?


Post a reply to this message

From: clipka
Subject: Re: This is great
Date: 22 Aug 2009 01:48:45
Message: <4a8f86bd$1@news.povray.org>
somebody schrieb:
> http://www.slipperybrick.com/2007/09/airline-seatbelt-engine-straps/

I cannot imagine this to be genuine: At the speed at which aircraft 
engines operate, these straps would either /be/ torn to pieces, or /do/ 
tear the blades to shreds.

The blades don't look that good either, so I'd expect the engine to just 
disintegrte impressively anyway next time it is operated at full throttle.


Post a reply to this message

From: Warp
Subject: Re: This is great
Date: 22 Aug 2009 03:54:38
Message: <4a8fa43e@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> I would think that a good optimizing compiler would translate something 
> like "x = -x;" to equally efficient code...?

  Out of curiosity, I tested how gcc compiles this function with maximum
optimizations (-O3 -ffast-math -march=native):

void negate(double* values, unsigned amount)
{
    for(unsigned i = 0; i < amount; ++i)
        values[i] = -values[i];
}

  The relevant part of the asm output was:

	xorl	%eax, %eax
.L7:
	fldl	(%edi,%eax,8)
	fchs
	fstpl	(%edi,%eax,8)
	addl	$1, %eax
	cmpl	%eax, %esi
	ja	.L7

  So it is loading the values into the FPU one by one, negating them there
and then storing them back into RAM.

-- 
                                                          - Warp


Post a reply to this message

From: Warp
Subject: Re: This is great
Date: 22 Aug 2009 04:00:17
Message: <4a8fa591@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> somebody schrieb:
> > http://www.slipperybrick.com/2007/09/airline-seatbelt-engine-straps/

> I cannot imagine this to be genuine: At the speed at which aircraft 
> engines operate, these straps would either /be/ torn to pieces, or /do/ 
> tear the blades to shreds.

> The blades don't look that good either, so I'd expect the engine to just 
> disintegrte impressively anyway next time it is operated at full throttle.

  Genuine and genuine. It depends on your definition of "genuine".

  It *is* a genuine photograph in the sense that it's an unmanipulated
photo of an actual situation (ie. not staged for this photo in question).

  What is "not genuine" is just the false impression it gives. In other
words the real reason for the straps to be there may not be immediately
obvious to the viewer, thus the viewer gets confused and the wrong
impression, making this *perception* "not genuine".

  The real explanation for the straps is quite simple: They keep the blades
in place for transport of the engine, so that they don't rotate freely
during transport. The engine in this photo has probably just been readied
to be transported to maintenance or scrapping.

-- 
                                                          - Warp


Post a reply to this message

From: andrel
Subject: Re: This is great
Date: 22 Aug 2009 07:51:41
Message: <4A8FDBCE.4030400@hotmail.com>
On 22-8-2009 9:54, Warp wrote:
> clipka <ano### [at] anonymousorg> wrote:
>> I would think that a good optimizing compiler would translate something 
>> like "x = -x;" to equally efficient code...?
> 
>   Out of curiosity, I tested how gcc compiles this function with maximum
> optimizations (-O3 -ffast-math -march=native):
> 
> void negate(double* values, unsigned amount)
> {
>     for(unsigned i = 0; i < amount; ++i)
>         values[i] = -values[i];
> }
> 
>   The relevant part of the asm output was:
> 
> 	xorl	%eax, %eax
> .L7:
> 	fldl	(%edi,%eax,8)
> 	fchs
> 	fstpl	(%edi,%eax,8)
> 	addl	$1, %eax
> 	cmpl	%eax, %esi
> 	ja	.L7
> 
>   So it is loading the values into the FPU one by one, negating them there
> and then storing them back into RAM.

For comparison, how would you code the bit reversal routine?
Then explain why that would be faster?
Will that differ on 32 and 64 bit architectures?
Will the result differ for exceptional cases: NaN, inf, subnormal 
numbers and 0? If so which implementation is more 'correct'?


Post a reply to this message

From: Florian Pesth
Subject: Re: This is great
Date: 22 Aug 2009 10:47:29
Message: <4a900501@news.povray.org>
Am Sat, 22 Aug 2009 04:00:17 -0400 schrieb Warp:

>   Genuine and genuine. It depends on your definition of "genuine".
> 
>   It *is* a genuine photograph in the sense that it's an unmanipulated
> photo of an actual situation (ie. not staged for this photo in
> question).

Indeed:

http://www.snopes.com/photos/airplane/airchina.asp


Post a reply to this message

From: clipka
Subject: Re: This is great
Date: 22 Aug 2009 15:09:12
Message: <4a904258$1@news.povray.org>
Florian Pesth schrieb:
>>   It *is* a genuine photograph in the sense that it's an unmanipulated
>> photo of an actual situation (ie. not staged for this photo in
>> question).
> 
> Indeed:
> 
> http://www.snopes.com/photos/airplane/airchina.asp

That's indeed a more credible background story (though I don't doubt 
many people would think otherwise, and readily believe the Air China story).


Post a reply to this message

From: Chambers
Subject: Re: This is great
Date: 22 Aug 2009 20:28:07
Message: <4a908d17$1@news.povray.org>
Invisible wrote:
> Wouldn't this make it scientifically impossible to deliver a working 
> product?

The more complex a project is, the greater the likelihood of bugs appearing.

The more bugs there are, the more likely they are to be hard to find.

Some bugs are so infrequent, and so well hidden, that it would take the 
equivalent of dozens (or hundreds) of man-years to find them.  True, 
"with enough eyes all bugs are shallow," but sometimes the requisite 
number of eyes is just infeasible.

And it's perfectly possible to deliver a working product that has bugs 
in it ;)

...Chambers


Post a reply to this message

From: Jim Henderson
Subject: Re: This is great
Date: 23 Aug 2009 00:59:11
Message: <4a90cc9f$1@news.povray.org>
On Fri, 21 Aug 2009 15:08:27 +0100, Invisible wrote:

>> Yeah, it's kind of fun developing software for devices where
>> occasionally the only way to get any helpful debug information out of
>> the thing is by switching an LED on or off, and errors might just as
>> well be hardware-related.
> 
> Wouldn't this make it scientifically impossible to deliver a working
> product?

Clearly not, since such products exist. ;-)

Jim


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.