On 05/18/2017 08:56 AM, Reimar Grabowski wrote:
On Thu, 18 May 2017 08:40:43 -0700
Jon Foster <jon-li...@jfpossibilities.com> wrote:

I limited run time to 10secs, and used "time" to verify actual run time.
Here are the results, time output listed first and the first section of the
gprof output without comments:
A little of topic but did gprof just work like it used to?
I remember last time I tried to profile with gprof I could not get it to work 
and even asked about this on this list and was suggested alternatives.
Has there been something fixed or is it by chance that it works?
It just worked for me. I'm using FPC 3.0.0 with gprof 2.22. Probably an older version as I'm still running Debian 7 32bit. If it hadn't just worked I wouldn't have been able to post anything more useful in a timely fashion.
The code that is slow appears to be all standard floating point and integer
math
AFAIK floating point math is done using the extended type (as the gprof output 
shows) and there are no optimizations for single or double.
Correct me if I am wrong.


I read that some were having trouble compiling Graeme's code because of SDL version differences so I stripped out the SDL code and replaced the timing function with traditional time/now calls. I then realized I still had Kylix buried in some recess of all these excess terabytes and thought I'd see what happens if I compiled the code with that. So I went through another set of changes taking out all of the neat FPC C style operators and returning them to the traditional ones. And put "inline" declarations and other useful FPC defines in ifdefs. I then back ported all of those changes into the SDL enabled code just to make sure it still rendered accurately.

You can find both versions in my GitHub account: https://github.com/jafcobend/fpcflop

Graeme, I assume you don't mind me reposting that code on GuitHub? If so I can take it down.

The headless code when compiled with "fpc -XXs -O3" on my 32bit Linux box produces the preset 100 frames in about 32secs, a tad over 3fps. When compiled with "dcc" (Kylix v3) using whatever its default optimizations are and losing the FPC inlining, runs just slightly faster averaging 29sec for the 100 frame runs. Not much better, but not worse either. Kind of thought that loss of inlining would have hurt more. Or maybe it does and that's why it didn't do much better.--

--
Sent from my Debian Linux workstation -- http://www.debian.org/intro/about

Jon Foster
JF Possibilities, Inc.
j...@jfpossibilities.com

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to