MC: Faster User-RPL HILBERT
07-10-2018, 09:50 AM (This post was last modified: 07-10-2018 09:52 AM by Gerald H.)
Post: #12
 Gerald H Senior Member Posts: 1,452 Joined: May 2014
RE: MC: Faster User-RPL HILBERT
(07-09-2018 03:16 PM)Thomas Okken Wrote:  I'm guessing the point of the exercise is to avoid unnecessary calculations. This will do so, at the cost of putting n^2 objects on the stack:

Code:
<< DUP 1 - -> n n1    << 1 n FOR i i INV NEXT       n 1 + n n1 + FOR i n1 DUPN i INV NEXT       n DUP 2 ->LIST ->ARRY    >> >>

119.5 bytes.
I don't have a real RPL calculator so I can't really time this, unfortunately.

Faster for integers on 50g if you replace

INV

by

-1 ^

but slower for reals.
 « Next Oldest | Next Newest »

 Messages In This Thread MC: Faster User-RPL HILBERT - Joe Horn - 07-09-2018, 01:28 PM RE: MC: Faster User-RPL HILBERT - Thomas Okken - 07-09-2018, 03:16 PM RE: MC: Faster User-RPL HILBERT - rprosperi - 07-09-2018, 04:32 PM RE: MC: Faster User-RPL HILBERT - Joe Horn - 07-09-2018, 05:25 PM RE: MC: Faster User-RPL HILBERT - Valentin Albillo - 07-09-2018, 09:46 PM RE: MC: Faster User-RPL HILBERT - Thomas Okken - 07-09-2018, 11:03 PM RE: MC: Faster User-RPL HILBERT - Joe Horn - 07-09-2018, 11:43 PM RE: MC: Faster User-RPL HILBERT - Thomas Okken - 07-10-2018, 01:25 AM RE: MC: Faster User-RPL HILBERT - Gerald H - 07-10-2018 09:50 AM RE: MC: Faster User-RPL HILBERT - ttw - 07-09-2018, 05:10 PM RE: MC: Faster User-RPL HILBERT - Thomas Okken - 07-10-2018, 01:58 AM RE: MC: Faster User-RPL HILBERT - Werner - 07-10-2018, 07:20 AM RE: MC: Faster User-RPL HILBERT - John Keith - 08-05-2018, 02:05 PM RE: MC: Faster User-RPL HILBERT - Juan14 - 08-05-2018, 06:31 PM RE: MC: Faster User-RPL HILBERT - John Keith - 08-05-2018, 07:40 PM

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