[fpc-devel] Vector Pascal (AKA Glasgow Pascal etc.)
Mark Morgan Lloyd
markMLl.fpc-devel at telemetry.co.uk
Fri Apr 12 19:53:16 CEST 2013
I see it gets discussed here once every three or four years, but I just
thought I'd throw in that I've been playing briefly with the Vector (AKA
Glasgow) compiler and get a quite impressive speedup when telling it to
compile for two cores rather than one:
0 1>markMLl at pye-dev-07:~$ time ./test # Compiled for 1 core
real 0m18.753s
user 0m18.733s
sys 0m0.000s
0 1>markMLl at pye-dev-07:~$ time ./test # Compiled for two cores
real 0m11.908s
user 0m20.425s
sys 0m2.036s
Test program, based on an example in their manual:
program Test;
var i: integer;
procedure sub2d;
type range= 0..127;
var x, y, z: array[range, range] of single { real } ;
begin
x := y - z
end;
begin
{ WriteLn('Hello, World!') }
for i := 0 to 65535 do
sub2d
end.
I know it's pretty crappy and doesn't initialise variables etc., but I
was interested to see if it really did distribute work properly.
I note FPC's undocumented -Sv option from earlier discussion, but it
appears not to like the 2D array so compilation fails at the subtraction.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the fpc-devel
mailing list