|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] Boolean Packing |
Date: | Fri, 21 Aug 2015 18:40:56 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
Hi, in the good old days (= long before APL2) the data type was a property of the value and memory was always too small. At that time all values were homogeneous. Then APL2 came and most vendors of old APL simply added a new thing called a mixed value which would take care of the non-homogeneous cases (and hoping there would not be that many). GNU APL came long after APL and when thinking about using homogeneous arrays, I came to the conclusion that they have no place in a new, object oriented design. In other words, GNU APL considers mixed arrays as the normal case rather than the exception. I would also argue that the speed advantage is very minor: - it only applies to ∧ ∨ ⍲ ⍱ and monadic ∼ and only if the arrays are homogeneous (for ∧ and ∨ they do not have to be). - most of the time spent in APL execution is for checking various things as opposed to the pure computation of results (read: new ravel elements). - homogeneous arrays often trigger re-computation if the entire value; For example: Z←1000000⍴0 ◊ Z[2]←2 ◊ Z←4]←'a' And even though you may gain a few microseconds when computing the above functions, you pay them back when checking for the homogeneous case all over the place. In other words, adding homogeneous arrays will most likely fire back in terms of performance. /// Jürgen On 08/21/2015 07:06 AM, Elias Mårtenson
wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |