Skip to content

Duplicate rows idiom

Vector 5:1, page 103

programming techniques performance

Transcribed from the printed issue; not yet reviewed. Read it in the PDF of the issue, page 103

May I thank Bob Bykerk for the first paragraph of his letter in VECTOR 4.4 about removing all duplicated rows in a matrix. Not only is his idiom more elegant than the one in my letter (VECTOR 4.2), but its simplicity makes it easier to remember. Perhaps more important, it is very much more efficient, and runs some 25 times faster under VS APL.

Here is one example of why it is worth publishing not-so-good code - it helps turn up something better!

Of course with hindsight it is obvious, but I always find that the trouble with hindsight is that it never seems to be available at the times when you really need it!

Peter Branson