Post Reply 
RPL mini-challenge: Create an anti-Identity Matrix
05-15-2018, 06:48 PM
Post: #42
RE: RPL mini-challenge: Create an anti-Identity Matrix
(05-15-2018 03:31 PM)David Hayden Wrote:  
Code:
DUPDUP 2. \->LIST 1. CON SWAP IDN -
With input 30, it takes 2.47 seconds on a 50g.

A modified version of Claudio's program takes 3.4 seconds:
Code:
IDN DUP 1. CON SWAP -

I like your improvement on my short version. I was doing NEG on the identity matrix, way slower than using SWAP and subtracting, that has to save significant time.

Now I can't fully understand why the code above, being the EXACT same commands except you added 2 ->LIST and replaced one DUP with one DUPDUP, would be 30% faster. Isn't it doing the same thing? Or are CON and IDN much faster when you use size arguments in lists?
I just can't explain it.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: RPL mini-challenge: Create an anti-Identity Matrix - Claudio L. - 05-15-2018 06:48 PM



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