Post Reply 
50g System RPL list processing
06-21-2014, 02:13 AM
Post: #2
RE: 50g System RPL list processing
I've thought about doing something like this for list processing, but I never did. (I don't know enough about SYS RPL to matter and if the speed really needs to be fast, I just switch over to a computer.

What I wanted was a more useful definition of some of the list operations. For example, I spend too much programming space (if not time) checking for empty lists or lists with one element before doing processing. It makes it tedious to program variable dimension operations. It doesn't matter much except in inner loops where this sometimes takes up 30% of the execution time.

A list sum should return zero on an empty (or non-existent) list or the only element if a single element list (or a single variable is returned.) Similarly for the produce (but here the product of an empty list is one rather than zero.) A scalar should promote up to a list. For that matter, operations on conformable lists-of-lists should work (->Q works but addition doesn't.)

I got around some of the problem by preceding each sum by 0 1 ->List + or 1 1->List +for products. It's not perfect but helps.

I did in User RPL create min and max reduction operators for lists (trivial, for min just use xxxx <<min>> STREAM and similarly for max. To get the range of a list doing the above with max then min then subtracting was much faster than sorting and subtracting the first element from the last (or sorting, doing a delta list followed by a sum list).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: 50g System RPL list processing - ttw - 06-21-2014 02:13 AM
RE: 50g System RPL list processing - Han - 10-28-2014, 05:06 PM
RE: 50g System RPL list processing - Han - 10-31-2014, 02:15 PM
RE: 50g System RPL list processing - Han - 11-01-2014, 08:34 PM
RE: 50g System RPL list processing - Han - 11-02-2014, 01:04 AM
RE: 50g System RPL list processing - Han - 11-01-2014, 08:31 PM
RE: 50g System RPL list processing - Han - 11-02-2014, 06:26 PM



User(s) browsing this thread: 1 Guest(s)