New g++ template stress/regression test?

View: New views
4 Messages — Rating Filter:   Alert me  

New g++ template stress/regression test?

by Sebastian Mach :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I wonder if there would be an interest for a C++ template / compile
time ray tracer as a heavy test for

* templates in general
* the type system
* regression and conformance testing

I have a 95% complete template ray tracer based on fractional math.
One thing e.g. that became evident for me during development is that
performance of lookup or other type system related code degrades
exponentially; such stuff could be tested with it.

I guess the code is also very sensible to conformance.

It is currently based on g++-4.4's support for c++0x (i.e. variadic
templates + strongly typed enums), but I could port it back to 2003.

As said, it is not bugfree as for an error somewhere in the shading or
vector math, but I hereby liked to know if there is generally such an
interest.


Have a great day

Sebastian Mach

Re: New g++ template stress/regression test?

by Dave Korn-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sebastian Mach wrote:
> I wonder if there would be an interest for a C++ template / compile
> time ray tracer as a heavy test for
>
> * templates in general
> * the type system
> * regression and conformance testing

  How big is it?  It might be suitable to go in the contrib/ dir, we already
keep a copy of the paranoia FP tests in there, so your template package and
maybe a testscript to run it and record stats might make a nice little
addition in the same spirit.

    cheers,
      DaveK

Parent Message unknown Re: New g++ template stress/regression test?

by Sebastian Mach :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/6 Dave Korn <dave.korn.cygwin@...>:
>
> [  You should send these emails to the list so that people with maintainer
> rights see the thread - I can't approve contributions myself.  ]

[ facepalm, this is the second time this happens to me, sorry. I will
re-quote for sake of completeness; errors in the following quotes go
at my cost]

>> DaveK wrote:
>>> How big is it?  It might be suitable to go in the contrib/ dir, we already
>>>keep a copy of the paranoia FP tests in there, so your template package and
>>>maybe a testscript to run it and record stats might make a nice little
>>>addition in the same spirit.
>>>
>>>
>Sebastian Mach wrote:
>>Pardon for the inprecise answer (I am relocating at the moment and am
>>posting this from my occupation box), but afair it is somewhere
>>between 1000 or 2000 lines of code, currently it's all in one file,
>>and only invokes standard headers (the output is in ppm format, but
>>arbitrary outputs can be added in a glimpse (like a type-id-name
>>output, e.g.)).
>>
>>Of course the performance is extremely snaily, but I have a small bash
>>script that can utilize all cores and which subdivides the compile
>>into many pieces (as said, performance degrades superlinear w.r.t.
>>type-id count), but still a render of 250x250 pixels took about 26
>>hours. Smaller ones of less than 50x50 can be obtained (as far as I
>>remember) in < 1 hr.
>>
>>

DaveK wrote:
>  It doesn't seem like an excessively large file to me, it's the same scale as
> paranoia.cc; maybe you should just whip it up into a patch and submit it to
> the -patches list.  Add in the script you have, and if you wanted to be really
> comprehensive, include some sample timing runs in the comments showing the
> difference between 4.4 and the (we hope) improvements on HEAD.
>
>    cheers,
>

Many thanks for your help.

So I will see to get that thing ready in the next days (or, who knows,
weeks). Those might be pretty interesting results as for the mentioned
quadratic runtime in 4.4 vs. linear 4.5.

Re: New g++ template stress/regression test?

by Bugzilla from gerald@pfeifer.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, 6 Nov 2009, Dave Korn wrote:

>> I wonder if there would be an interest for a C++ template / compile
>> time ray tracer as a heavy test for
>>
>> * templates in general
>> * the type system
>> * regression and conformance testing
> How big is it?  It might be suitable to go in the contrib/ dir, we already
> keep a copy of the paranoia FP tests in there, so your template package and
> maybe a testscript to run it and record stats might make a nice little
> addition in the same spirit.

I don't think that's a good idea.  Rather, why not add this to

  http://gcc.gnu.org/testing/

(look for "Build and test guide" there) if it really is a useful test?

Gerald