Felipe Monteiro de Carvalho wrote:
For your information: that already exists in FPC. It's called operator overloading:
GPC has operator overloading as well (as was mentioned here before), and a straightforward array multiplication operator can be implemented in GPC as is.
But I think John's main point was parallelization, i.e. multiplication of larger arrays (I suppose, 37 wouldn't quite make it worthwhile ;-) would automatically be distributed over multiple processors as he wrote, or as we'd probably implement it, into several threads (where the thread -> CPU mapping is left to the OS).
I think perhaps also this can be implemented purely as library code (I generally prefer to keep as much as possible outside of the compiler, because inside of the compiler most things are usually much more complicated). It's not trivial (as multithreading always isn't), and some care is necessary because GPC's runtime in general isn't thread-safe yet, but with careful programming it might be possible today. (If not, some hopefully small issues WRT GPC or the runtime which might arise would need to be fixed.)
Frank