On Jul 18, 2025, at 2:38 AM, Shawn Rutledge <[email protected]> wrote:
> 
> Using linked lists for everything is already wasteful: no need make it worse 
> by taking a 128-bit cons cell, two values, and then adding a few more bits to 
> each value for the type tag.  You might end up doubling the size to keep word 
> alignment.  The techniques for stealing bits to tag the type are well-known, 
> and almost every serious interpreter uses them… but usually not the “weekend 
> scheme” implementations.)

s9fes uses 3 arrays: Car, Cdr & Tag. That makes it portable across word sizes 
16, 32 & 64. And slow. But no memory is wasted (other than the unused portions 
of these arrays). To convert it to a tagged value version is likely a weekend 
challenge for some of you!
------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T480d89e0fb47654b-M52863477d66843dea31b372c
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to