POV-Ray : Newsgroups : povray.beta-test : v3.8 Clean up TODOs. f_superellipsoid() / shadow cache. : Re: v3.8 Clean up TODOs. f_superellipsoid() / shadow cache. Server Time
25 Sep 2022 09:50:11 EDT (-0400)
  Re: v3.8 Clean up TODOs. f_superellipsoid() / shadow cache.  
From: William F Pokorny
Date: 18 Apr 2020 15:02:07
Message: <5e9b4eaf$1@news.povray.org>
On 4/18/20 2:12 PM, jr wrote:
> hi,
> would "spacing" with 'nanosleep(2)' help?

Thought about such things and, yes, expect something like that might help.

The solution I settled upon was to add a field to f_superellipsoid() 
which lets me switch to a single float version of the code. The 
hardware/alg/SIMD? lanes are wide enough singles run fast like we'd 
expect from an inbuilt. Except at the parameter edges (near zero, larger 
value differences) of the EW,NS, it's working well enough the difference 
is impossible to spot unless you run value or image compares of some 
kind. Single nearly 2x faster than the SDL version and even faster than 
the inbuilt at double float given the pow() bottleneck.

Trick helps enough, I wonder if some other inbuilts could benefit from a 
float over double option too. But, I'm deleting many of the more obscure 
built in functions(1). We have functions for shapes and 'things' that 
are interesting to run - once - but not generally useful otherwise. Plus 
the values and polarities are all over the place with them. Leaves not 
many functions where the trick might apply.

Bill P.

(1) - Maybe at some point down the road I'll create a f_museum() 
function and roll all of the obscure stuff into that one function by index.

Post a reply to this message

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