mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 05:39:26 +02:00
* improved recursive benchmark
git-svn-id: trunk@8592 -
This commit is contained in:
parent
c6d42528a2
commit
956d5e1c91
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
63
tests/bench/shootout/src/recursive.lpi
Normal file
63
tests/bench/shootout/src/recursive.lpi
Normal 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>
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user