Post Reply 
RPL mini-challenge: Create an anti-Identity Matrix
05-13-2018, 08:46 PM
Post: #26
RE: RPL mini-challenge: Create an anti-Identity Matrix
(05-13-2018 02:44 PM)DavidM Wrote:  
(05-13-2018 06:00 AM)Joe Horn Wrote:  How about this:
<< IDN << NOT >> MAP >>

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.

<< IDN ::NOT MAP >>

is even shorter (24 bytes!) but only a tad faster (30. [real] takes 8.2 seconds, and 30 [integer] takes 12.7 seconds). The null-tag trick for delaying execution goes back to the heyday of comp.sys.hp48, but I forget who first posted it.

Pier4r: I thought of some truly marvelous comments to include with the above program, but its margin is too narrow to contain them. Wink

<0|ΙΈ|0>
-Joe-
Visit this user's website 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 - Joe Horn - 05-13-2018 08:46 PM



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