i have tested a couple of benchmarking snippets on delphi like this one:
uses
...diagnostics;
procedure TForm2.Button1Click(Sender: TObject);
var
i,elapsed : integer;
stopwatch : TStopwatch;
ff: textfile;
begin
if FileExists('c:\bench.txt') then
DeleteFile('c:\bench.txt');
stopwatch := tstopwatch.create;
stopwatch.Reset;
stopwatch.Start;
AssignFile(ff,'c:\bench.txt');
Rewrite(ff);
for I := 1 to 999000 do
write(ff,'Delphi programmers are ladies men :D');
CloseFile(ff);
stopwatch.Stop;
elapsed := stopwatch.ElapsedMilliseconds;
showmessage(inttostr(elapsed));
end;
doesnt matter if i run/compile under debug or release configuration the result is mostly around 900. when i switch from debug to release in visual studio(for both c++ and c#) my programs become MAGICALLY faster.i am using delphi 2010 and i activate release configuration from project manager as well as project -> configuration manager and even project -> options -> delphi compiler but with no effect why????
if it matters : i am using windows xp ,i got 1 gig ram and an intel core 2 cpu