im disapointed with chome
i know it may mean nothing but i ported my usual bechmark to chome, and it simples ....
D7 / FPC
[pascal]program bech;
{$APPTYPE CONSOLE}
uses
SysUtils,
Windows;
var
i: integer;
a, b: string;
x, y: Double;
c: string;
t1, t2: Cardinal;
d: Integer;
begin
x := 3;
y := 0.2;
a := ParamStr(2);
b := ParamStr(3);
d := StrToInt(ParamStr(1));
// timing starts
t1 := GetTickCount;
for i := 1 to d do
if a <> b then
begin
x := x * y;
c := c + IntToStr(i) + 'x,';
end;
t2 := GetTickCount;
// timing ends;
writeln((t2 - t1), ' ms');
end.
[/pascal]
Chrome
[pascal]namespace bechmark;
interface
uses System.*;
type
ConsoleApp = class
public
class method Main(args: array of string);
end;
implementation
class method ConsoleApp.Main(args: array of string);
var
i: integer;
a, b: string;
x, y: double;
c: string;
t1, t2 : cardinal;
d : integer;
begin
x := 3;
y := 0.2;
a := args[1];
b := args[2];
d := integer.Parse(args[0]);
// timing starts
t1 := DateTime.Now.Ticks;
for i := 1 to d do
if a <> b then
begin
x := x * y;
c := c + i.ToString + 'x,';
end;
t2 := DateTime.Now.Ticks;
// timing ends;
Console.WriteLine((t2-t1)/10000+'ms');
Console.ReadLine();
end;
end.
[/pascal]
.BAT
resultsCode:@ECHO OFF echo "delphi 7" bechD7 100000 "This is a BIG string 1" "This is a BIG string 2" bechD7 150000 "This is a BIG string 2" "This is a BIG string 3" bechD7 200000 "This is a BIG string 4" "This is a BIG string 5" echo "FPC 2.2" bechFPC 100000 "This is a BIG string 1" "This is a BIG string 2" bechFPC 150000 "This is a BIG string 2" "This is a BIG string 3" bechFPC 200000 "This is a BIG string 4" "This is a BIG string 5" echo "Chrome" bechChrome 10000 "This is a BIG string 1" "This is a BIG string 2" bechChrome 10000 "This is a BIG string 2" "This is a BIG string 3" bechChrome 10000 "This is a BIG string 4" "This is a BIG string 5"
Chrome app only runs once, the second i dont know why does not end..
(i waited for 3 min twice and it does not ended) .net framework problem maybe?
ps: the params for delphi7 and fpc are highter, if i set the same for Chrome it does not end after 3min...
Bookmarks