Mojo v. Python v. Julia: Advent of Code 2024, Day 04

Поделиться
HTML-код
  • Опубликовано: 19 дек 2024

Комментарии • 10

  • @leandrodeleite
    @leandrodeleite 4 дня назад +2

    Interesting comparison. Learn a lot from it, thanks!

  • @grandlagging0zero175
    @grandlagging0zero175 3 дня назад +2

    maybe add haskell? elixir? f#? rust? golang?
    maybe it's worth testing them in task 13?

    • @ekbphd3200
      @ekbphd3200  3 дня назад +1

      Maybe I'll try rust. I haven't yet looked at those other languages.

    • @grandlagging0zero175
      @grandlagging0zero175 3 дня назад

      @ekbphd3200 why not? Use AI for generate code...

  • @SchmidiAUT
    @SchmidiAUT 3 дня назад +1

    You aren't supposed to use try catch, as part of your logic. While on happy path it comes without overhead, on error path it is horrible slow.
    Julia should perform much better if you don't use the try catch.

    • @ekbphd3200
      @ekbphd3200  3 дня назад +1

      Wow! Thanks for that feedback. I didn't know that. I try that, our rather I'll if-else that. 😁

    • @dustinhess6798
      @dustinhess6798 2 дня назад +2

      @@ekbphd3200 I also try on my laptop with python and julia performed very close on part aroun 15 micro seconds. I did not the gap you go in your results I can publish mine on git. I also too stab at part on and wrote it my own way and in part one I using benchmark tool I get mean 1.38 microsconds compared to the 11 or 12 from published script. I can publish what did if you are interested. Also all this to help you write better julia code. I really like the content to keep it up.

    • @ekbphd3200
      @ekbphd3200  2 дня назад +2

      @@dustinhess6798 Yes, I'd appreciate seeing your code. I'm always interested in learning how to improve my code, as I'm not a trained computer scientist.

    • @dustinhess6798
      @dustinhess6798 День назад

      @@ekbphd3200 I tried to reply with github link like 3 time yesterday and you tube keep rejecting my comment for some reason. I will try to repost today. If this comment takes. Also one thing I want to note if you aren't aware is that is Julia is Column Major language.