Improving Prime Sieve Algo Performance with the Creator of Calva!

Поділитися
Вставка
  • Опубліковано 25 гру 2024

КОМЕНТАРІ • 7

  • @CalvaTV
    @CalvaTV 2 роки тому +4

    I now realize I forgot to mention something super important when we where starting to help the compiler avoiding runtime casting and stuff. The iterator variables in `loop` are always `long`s. So while it can be tempting to do stuff like `(unchecked-add-int i ...)` instead of `(unchecked-add p ...)` that can actually cost performance if the loop iterator is involved, because Clojure will cast it back to a `long` and possibly won't be doing it in the native compile time way, but instead at runtime. We're not doing and `unchecked-add` stuff there, but anyway, this can trip you up a bit. The thing to remember is that there is no way to make the iterator variable anything else than a `long`.

  • @CalvaTV
    @CalvaTV 2 роки тому +1

    Watching this I am often thinking how rude that Calva creator is, not listening to Daniel trying to say stuff. 😀 Not sure it is a complete excuse, but the audio lag was significant. The sound is traveling between Sweden and South Africa, so almost across the globe. Hmmm, at least I hope that explains it a bit, because I don't want to be that rude guy!

    • @onthecodeagain
      @onthecodeagain  2 роки тому

      haha! If I really want to say something, I'll make sure I interrupt you :D

  • @eugenej.5584
    @eugenej.5584 2 роки тому

    The video needs short intro with TODO list :thinking:

    • @eugenej.5584
      @eugenej.5584 2 роки тому +1

      I mean it looks like you can't just watch this stream without watching the previous one.

    • @onthecodeagain
      @onthecodeagain  2 роки тому +1

      Gonna add bookmarks tomorrow!

  • @mvillarreal6141
    @mvillarreal6141 2 роки тому +1

    ??????? ?