* improved recursive benchmark

git-svn-id: trunk@8592 -
This commit is contained in:
Vincent Snijders 2007-09-21 14:07:35 +00:00
parent c6d42528a2
commit 956d5e1c91
3 changed files with 66 additions and 2 deletions

1
.gitattributes vendored
View File

@ -5640,6 +5640,7 @@ tests/bench/shootout/src/mandelbrot.pp svneol=native#text/plain
tests/bench/shootout/src/meteorshower.pp svneol=native#text/x-pascal
tests/bench/shootout/src/nsieve.pp svneol=native#text/plain
tests/bench/shootout/src/partialsums.pp svneol=native#text/plain
tests/bench/shootout/src/recursive.lpi svneol=native#text/plain
tests/bench/shootout/src/recursive.pp svneol=native#text/plain
tests/bench/shootout/src/regexdna.pp svneol=native#text/plain
tests/bench/shootout/src/simple_hash.pp svneol=native#text/plain

View File

@ -0,0 +1,63 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<PathDelim Value="\"/>
<Version Value="5"/>
<General>
<Flags>
<MainUnitHasUsesSectionForAllUnits Value="False"/>
<MainUnitHasCreateFormStatements Value="False"/>
<MainUnitHasTitleStatement Value="False"/>
</Flags>
<SessionStorage Value="InIDEConfig"/>
<MainUnit Value="0"/>
<TargetFileExt Value=".exe"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<Units Count="2">
<Unit0>
<Filename Value="recursive.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="recursive"/>
</Unit0>
<Unit1>
<Filename Value="run.bat"/>
<IsPartOfProject Value="True"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="5"/>
<PathDelim Value="\"/>
<CodeGeneration>
<Generate Value="Faster"/>
<Optimizations>
<OptimizationLevel Value="3"/>
</Optimizations>
</CodeGeneration>
<Linking>
<Debugging>
<UseLineInfoUnit Value="False"/>
</Debugging>
<LinkSmart Value="True"/>
</Linking>
<Other>
<CustomOptions Value="-Cppentium4"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</CONFIG>

View File

@ -7,7 +7,7 @@
program recursive;
{$I-}
{$I-}{$OPTIMIZATION TAILREC}
var
n : integer;
@ -28,7 +28,7 @@ begin
else Fib := Fib(n - 2) + Fib(n - 1)
end; { Fib }
function FibFP(n : double): double;
function FibFP(n : double): double; inline;
begin
if n < 2 then
FibFP := 1