RPL mini-challenge: Create an anti-Identity Matrix
|
05-13-2018, 02:44 PM
Post: #21
|
|||
|
|||
RE: RPL mini-challenge: Create an anti-Identity Matrix
(05-13-2018 06:00 AM)Joe Horn Wrote: How about this: Nice, Joe! I'd be surprised if a more concise version exists (this one is 33 bytes). This is actually a great example of how size and speed don't always go hand-in-hand, though. In this case, IDN is quite fast, but applying NOT with MAP slows it down considerably. But I definitely think this qualifies as elegant. (05-13-2018 06:52 AM)Gerald H Wrote: Slightly faster than my 1st effort: Nice refinements, Gerald! My 50g clocked in at 1.21s for this one, which I believe is the fastest I've seen yet for an output of exact integers. (05-13-2018 10:27 AM)pier4r Wrote: ...Fixed values, but not difficult to modify with variables. You're definitely getting great performance here, Pier! I look forward to seeing how this does once you've altered it to accept the dimension as an input variable. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 11 Guest(s)