On Tuesday 16 February 2016 16:10:27 Julio Jiménez wrote:
> The link:
>
> https://www.mail-archive.com/[email protected]/msg41615.html
>
> 2016-02-16 16:06 GMT+01:00 Fred van Stappen <[email protected]>:
> > Very impressive the result of MSElang.
> >
With LLVM 3.8.1 it is even better.
"
program test;
var
n1, n2, n3, n4, n5, n6, n7, n8: int32;
TicketsCount: int32;
i1: int32;
begin
for i1:= 0 to 9 do begin
TicketsCount := 0;
for n1 := 0 to 9 do
for n2 := 0 to 9 do
for n3 := 0 to 9 do
for n4 := 0 to 9 do
for n5 := 0 to 9 do
for n6 := 0 to 9 do
for n7 := 0 to 9 do
for n8 := 0 to 9 do
if n1 + n2 + n3 + n4 = n5 + n6 + n7 + n8 then
inc(TicketsCount);
end;
writeln('Found ', TicketsCount, ' tickets.');
end.
"
"
#include <stdio.h>
#include <stdint.h>
int main()
{
int n1, n2, n3, n4, n5, n6, n7, n8;
int i1;
int tickets_count;
for (i1 = 0; i1 < 10; i1++){
tickets_count = 0;
for (n1 = 0; n1 < 10; n1++)
for (n2 = 0; n2 < 10; n2++)
for (n3 = 0; n3 < 10; n3++)
for (n4 = 0; n4 < 10; n4++)
for (n5 = 0; n5 < 10; n5++)
for (n6 = 0; n6 < 10; n6++)
for (n7 = 0; n7 < 10; n7++)
for (n8 = 0; n8 < 10; n8++)
if (n1 + n2 + n3 + n4 == n5 + n6 + n7 + n8)
tickets_count++;
}
printf("Found %i tickets.",tickets_count);
return 0;
}
"
The best of 10 runs:
FPC fixes_3_0:
time ./benchmark_fpc.bin
Found 4816030 tickets.
real 0m5.570s
user 0m5.568s
sys 0m0.001s
gcc 4.8.1:
time ./benchmark_gcc.bin
Found 4816030 tickets.
real 0m1.620s
user 0m1.618s
sys 0m0.001s
CLANG 3.8.1:
time ./benchmark_clang.bin
Found 4816030 tickets.
real 0m0.983s
user 0m0.980s
sys 0m0.001s
MSElang with LLVM 3.8.1 backend:
time ./benchmark_mse.bin
Found 4816030 tickets.
real 0m0.890s
user 0m0.886s
sys 0m0.003s
Martin
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk