[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gforth] Gforth's fsl-util.*

From: David Kuehling
Subject: Re: [gforth] Gforth's fsl-util.*
Date: Mon, 26 Nov 2012 00:04:23 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

>>>>> "Bernd" == Bernd Paysan <address@hidden> writes:

> Am Sonntag, 25. November 2012, 10:35:22 schrieb Charles Montgomery:
>> The admittedly slow high-level versions of } and }} are provided for
>> the sake of portability that comes from being Standard.  If you
>> should come up with improvements for a specific architecture, or
>> other things as suggested by Bernd, they could be made available to
>> other FSL users by adding them in an auxiliary file on the taygeta
>> site.  (Such files don't need to go through the reviewing process
>> used for the Library Algorithms.)

> No, } and }} are broken by design, as they do not address the actual
> problem: Iterate through vectors and arrays.  If you write a
> scientific library, you should have good higher order primitives, and
> iteration through a vector or array is such a higher order primitive.

I am aware that } and }} are suboptimal for various reasons.  However,
From the standponit of a person who just wants to quickly implement some
readable math code, using concepts and semantics not too different from
Octave (MatLab) or Fortran, they do their job very well.  

No, people hacking math algorithms usually don't want to think about
iterators and data-flow, or about vector-multiplication factors.  At
least not for the first version.  Ideally the syntax in Forth doesn't
look too different from the math formulas used on paper to derive the
algorithm in the first place.

If you want to optimize, you'll usually have to think about block matrix
algorithms, at which point your code will lose all its mathematical
clearness anyway.

So here is a person very happy with } and }} asking for as much
performance as possible for his non-optimized (but readable)
script-language-style math code.


GnuPG public key:
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40

Attachment: pgpmrTRshNb20.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]