Fast SEQUENCE iteration in Common Lisp

(world-playground-deceit.net)

49 points | by BoingBoomTschak 5 days ago ago

9 comments

  • vindarel 12 hours ago

    The same day, after this post, SBCL's main developer made reduce faster (https://www.reddit.com/r/lisp/comments/1pmip8o/fast_sequence...). Let's see on the next SBCL release what the final results are.

    • themafia 12 hours ago

      Stas is a machine. Almost every single day he's in the sources making improvements. I joined the sbcl-commit list recently and the project is far more active and cared for than I had originally suspected.

      • stackghost 7 hours ago

        SBCL is a treasure. I really enjoy writing lisp, I just wish the library ecosystem was a little more mature.

        I still use it whenever I can

        • CyberDildonics 6 hours ago

          It has only been 68 years, give it a little more time.

  • matheusmoreira 12 hours ago

    > sequences are a band-aid over the lack of real iterator protocol

    Wouldn't it be better to solve that problem? Proper generalized iteration with generators is just semicoroutines which can be implemented by swapping around stack pointers with zero copying. Should be competitive performance wise.

    • BoingBoomTschak 11 hours ago

      As linked, the extensible sequence protocol (https://shinmera.com/docs/trivial-extensible-sequences/) already exists and is quite workable. The problem is that it's not supported enough, both by implementations (CCL missing, for example) and the entire ecosystem.

      In the end, it's simpler to stay with boring, ANSI compliant solutions well optimized by compilers.

      • shawn_w 9 hours ago

        I've been toying with trying to add extensible sequences to ccl as a way to get more familiar with it, but ccl development seems dead so I'm not sure it's worth the effort.

      • stackghost 7 hours ago

        There are effectively two Common Lisp worlds: the commercial world where Allegro and Lispworks dominate, and the non-commercial world where SBCL is more or less the only game in town.

        CCL, as far as I can tell, is abandonware

        • a-french-anon 2 hours ago

          Personally, I still try to support CCL, ECL and CLISP in addition to SBCL; I mostly ignore CLISP's warnings though.