diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 43ca41984..df0860ba0 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "8"; public const string Build = "3"; - public const string Revision = "3113"; + public const string Revision = "3114"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index 5bf5cf008..e87e07150 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%MINOR%=8 -%REVISION%=3113 %COREVERSION%=3 +%REVISION%=3114 +%MINOR%=8 %MAJOR%=3 diff --git a/InstallerSamples/Other/SpeedTests/AbsVsMathAbs.pas b/InstallerSamples/Other/SpeedTests/AbsVsMathAbs.pas new file mode 100644 index 000000000..2ab083828 --- /dev/null +++ b/InstallerSamples/Other/SpeedTests/AbsVsMathAbs.pas @@ -0,0 +1,11 @@ +// Abs для целых работает в 2.5 раза быстрее Math.Abs +begin + var s := 0; + var n := MaxInt; + loop n do + s := Abs(-2); + Print(MillisecondsDelta); + loop n do + s := System.Math.Abs(-2); + Print(MillisecondsDelta); +end. \ No newline at end of file diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 0d9fc2217..e72d17145 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.8.3.3113 +3.8.3.3114 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index a63a80933..ccd9e66f4 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.8.3.3113' +!define VERSION '3.8.3.3114' diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index b78645fad..38458591f 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -8275,13 +8275,13 @@ function Sign(x: uint64): integer := 1; function Sign(x: real): integer := Math.Sign(x); -function Abs(x: shortint): shortint := Math.Abs(x); +function Abs(x: shortint): shortint := if x >= 0 then x else -x; -function Abs(x: smallint): smallint := Math.Abs(x); +function Abs(x: smallint): smallint := if x >= 0 then x else -x; -function Abs(x: integer): integer := Math.Abs(x); +function Abs(x: integer): integer := if x >= 0 then x else -x; -function Abs(x: int64): int64 := Math.Abs(x); +function Abs(x: int64): int64 := if x >= 0 then x else -x; function Abs(x: BigInteger): BigInteger := BigInteger.Abs(x); diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index b78645fad..38458591f 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -8275,13 +8275,13 @@ function Sign(x: uint64): integer := 1; function Sign(x: real): integer := Math.Sign(x); -function Abs(x: shortint): shortint := Math.Abs(x); +function Abs(x: shortint): shortint := if x >= 0 then x else -x; -function Abs(x: smallint): smallint := Math.Abs(x); +function Abs(x: smallint): smallint := if x >= 0 then x else -x; -function Abs(x: integer): integer := Math.Abs(x); +function Abs(x: integer): integer := if x >= 0 then x else -x; -function Abs(x: int64): int64 := Math.Abs(x); +function Abs(x: int64): int64 := if x >= 0 then x else -x; function Abs(x: BigInteger): BigInteger := BigInteger.Abs(x);