POV-Ray : Newsgroups : povray.general : [announce] JITC: Really fast POVRay FPU Server Time
15 Nov 2024 15:16:55 EST (-0500)
  [announce] JITC: Really fast POVRay FPU (Message 1 to 1 of 1)  
From: Wolfgang Wieser
Subject: [announce] JITC: Really fast POVRay FPU
Date: 3 Aug 2004 18:11:15
Message: <41100d82@news.povray.org>
Hello all...

the last two days, I wrote a patch for UNIX POVRay-3.6. to speed 
up user-functions as used e.g. in isosurfaces. 

Instead of interpreting the functions as done by the POV VM, this 
patch does just-in-time compilation of the function using the system 
compiler -- all that on-the-fly completely transparent for the user. 

Result: Some scenes trace 4 times as fast!

Details: 
http://www.cip.physik.uni-muenchen.de/~wwieser/render/povray/patches/jitc-patch/

Disclaimer: 
- The patch is Linux-specific. Probably Minor efford porting to other UNICes 

- The patch is _highly_experimental_. It works fine for me but I expect that 

- The patch is not cleanly designed in several points. Unfortunately, during 


Any comments welcome. 
Wolfgang


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: [announce] JITC: Really fast POVRay FPU
Date: 3 Aug 2004 18:14:47
Message: <41100e57@news.povray.org>
In article <41100d82@news.povray.org> , Wolfgang Wieser 
<wwi### [at] nospamgmxde>  wrote:

> - The patch is Linux-specific. Probably Minor efford porting to other UNICes


You are aware that the official POV-Ray for Mac OS does include a
just-in-time compiler, aren't you?

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Nicolas Calimet
Subject: Re: [announce] JITC: Really fast POVRay FPU
Date: 3 Aug 2004 18:27:35
Message: <41101157$1@news.povray.org>
> You are aware that the official POV-Ray for Mac OS does include a
> just-in-time compiler, aren't you?

	It's very likely Wolfgang never tried the Mac OS version  ;-)

	Sounds like a cool patch anyway !

	- NC


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: [announce] JITC: Really fast POVRay FPU
Date: 3 Aug 2004 18:39:20
Message: <41101418@news.povray.org>
In article <41101157$1@news.povray.org> , Nicolas Calimet 
<pov### [at] freefr>  wrote:

>> You are aware that the official POV-Ray for Mac OS does include a
>> just-in-time compiler, aren't you?
>
>  It's very likely Wolfgang never tried the Mac OS version  ;-)

That is true, but using the core code SYS_FUNCTIONS macro family would have
made integration of a JIT compiler possible without hacking fnpovfpu.cpp.
In particular because they are documented to exist exactly for that purpose.
Would at least have made the whole implementation easier...

>  Sounds like a cool patch anyway !

Certainly!  On the other hand, calling gcc is overkill to make JIT
compilation possible :-)

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Eli
Subject: Re: [announce] JITC: Really fast POVRay FPU
Date: 3 Aug 2004 19:12:52
Message: <41101bf4$1@news.povray.org>
haven't tried it myself, but........ wow!


Post a reply to this message

From: Eli
Subject: Re: [announce] JITC: Really fast POVRay FPU
Date: 3 Aug 2004 19:14:53
Message: <41101c6d@news.povray.org>
otherwise encorporate the whole gcc thing in pov-ray. probably impossible
because of licensing issues.


Post a reply to this message

From: Christoph Hormann
Subject: Re: [announce] JITC: Really fast POVRay FPU
Date: 4 Aug 2004 01:40:01
Message: <cepsnj$260$1@chho.imagico.de>
Wolfgang Wieser wrote:
> Hello all...
> 
> the last two days, I wrote a patch for UNIX POVRay-3.6. to speed 
> up user-functions as used e.g. in isosurfaces. 
> 
> Instead of interpreting the functions as done by the POV VM, this 
> patch does just-in-time compilation of the function using the system 
> compiler -- all that on-the-fly completely transparent for the user. 
> 

I think the work probably would have been better invested in 
implementing an internal JIT compiler using the existing hooks as 
Thorsten explained.  This would work on all x86 systems (and for Mac an 
implementation already exists).

BTW your page does not say which optimizations you used for compiling 
the patched version.  To me it seems quite unlikely that you always get 
a speedup, there is also some overhead introduced by calling an external 
library.

None the less an interesting idea of course.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 06 Jul. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Wolfgang Wieser
Subject: Re: [announce] JITC: Really fast POVRay FPU
Date: 4 Aug 2004 05:29:29
Message: <4110ac78@news.povray.org>
Christoph Hormann wrote:
> I think the work probably would have been better invested in
> implementing an internal JIT compiler using the existing hooks as
> Thorsten explained.  This would work on all x86 systems (and for Mac an
> implementation already exists).
> 
Sounded interesting. I'll have a look at that. 
Why didn't anybody put that on a publically available todo list? ;) 

> BTW your page does not say which optimizations you used for compiling
> the patched version. 
>
Well, this actually does not matter much. As pointed out on my home page, 
I used the same compiler flags for the patched and the unpatched version 
to make sure that the timings can be compared. And of course, I used the 
best ones I know. 
-O2 -ffast-math -march=athlon-xp -Wno-multichar -finline-functions 
-funit-at-a-time -fno-rtti -mfpmath=387

> To me it seems quite unlikely that you always get 
> a speedup, there is also some overhead introduced by calling an external
> library.
> 
This is correct. An external no-op function called via a pointer takes 
about 10 times as long as an internal no-op function. 
No-op function means: 
  int foo(int x)  {  return(x);  }

But we should not forget that the huge swith-case construct in the main VM 
takes some time, too. And this switch is effectively eliminated by JITC. 

Wolfgang


Post a reply to this message

From: Wolfgang Wieser
Subject: Re: [announce] JITC: Really fast POVRay FPU
Date: 4 Aug 2004 05:33:53
Message: <4110ad81@news.povray.org>
Thorsten Froehlich wrote:

> In article <41100d82@news.povray.org> , Wolfgang Wieser
> <wwi### [at] nospamgmxde>  wrote:
> 
>> - The patch is Linux-specific. Probably Minor efford porting to other

> 
> You are aware that the official POV-Ray for Mac OS does include a
> just-in-time compiler, aren't you?
> 
Actually, I was not aware of that! I'll have a look. 
Thanks for the hint. 

Wolfgang


Post a reply to this message

From: ABX
Subject: Re: [announce] JITC: Really fast POVRay FPU
Date: 4 Aug 2004 05:41:49
Message: <7lb1h0pgvjkebk6e6ofo9a8hvdt5b07nt1@4ax.com>
On Wed, 04 Aug 2004 11:28:22 +0200, Wolfgang Wieser <wwi### [at] nospamgmxde>
wrote:
> Christoph Hormann wrote:
> > I think the work probably would have been better invested in
> > implementing an internal JIT compiler using the existing hooks as
> > Thorsten explained.  This would work on all x86 systems (and for Mac an
> > implementation already exists).
> 
> Sounded interesting. I'll have a look at that. 
> Why didn't anybody put that on a publically available todo list? ;) 

I have considered this task for the future versions of MegaPOV thought I would
be veeeeery happy if you could be faster :-)

ABX


Post a reply to this message

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