1. 19
  1.  

  2. 12

    Most of the posts in this meme have talked about what makes their language fast, this is the first I’ve seen that talks about what makes the language slow. And it does it in an interesting, insightful way. Kudos!

    1. 7

      Glad it was worth the read! I was a bit worried it might have been a bit too detailed.

      1. 3

        No it’s a great article! The internet doesn’t lack for articles lacking in detail, but articles like this are a rarity.

    2. 3

      How closely does the gabage collector mirror the paper that introduced that introduced it?

      1. 2

        Inko implements all of Immix, but with some differences/additions:

        • Inko block sizes are 8KB instead of 32KB (this works a bit better when you have many lightweight processes)
        • There are no different collectors for different generations (e.g. copying for the nursery vs Immix for the rest), instead we use Immix for everything
        • We drop unmanaged memory (e.g. the Rust array that backs an Inko array) when the memory is reused. Plain Immix doesn’t offer anything for this
      2. 3

        Great write-up! It made me curious about how Racket would fare.

        This 40 line Racket program is within about an order of magnitude of the wc implementation on my machine:

        ~/Downloads> time -l wc big.txt
          128457 1095695 6488666 big.txt
                0.03 real         0.02 user         0.00 sys
           1871872  maximum resident set size
                 0  average shared memory size
                 0  average unshared data size
                 0  average unshared stack size
               467  page reclaims
                 1  page faults
                 0  swaps
                 0  block input operations
                 0  block output operations
                 0  messages sent
                 0  messages received
                 0  signals received
                 4  voluntary context switches
                54  involuntary context switches
        
        ~/Downloads> time -l racket wc.rkt big.txt
          128457 1095695 6488666 big.txt
                0.17 real         0.14 user         0.02 sys
          33656832  maximum resident set size
                 0  average shared memory size
                 0  average unshared data size
                 0  average unshared stack size
              9269  page reclaims
                 0  page faults
                 0  swaps
                 0  block input operations
                 0  block output operations
                 0  messages sent
                 0  messages received
                 0  signals received
                 0  voluntary context switches
               592  involuntary context switches
        

        Though the comparison is a little unfair to Racket here since most of that time is startup time for the Racket VM and the run time is short enough that the JIT doesn’t really get to kick in. Are the larger test files mentioned in the Go and Haskell posts available anywhere? I’d like to see how this program does against those.

        1. 2

          You should get better start-up times with raco make wc.rkt and (optionally? I forget) raco exe -o rkt-wc wc.rkt.

          1. 3

            I did run ‘raco make’. ‘raco exe’ wouldn’t help improve the VM startup time significantly, though, because all it does is pack the runtime along with the code.

          2. 1

            I think most of these posts (unfortunately) don’t publish what input files they use.