How much faster is Rust than Python when finding neighboring words?

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

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

  • @NoX-512
    @NoX-512 2 месяца назад +1

    If you convert the text into an array of integers, where each integer is an index into an array (or tree) of unique words from the text, you could possibly speed up things by a lot, depending on how long it takes to set up the arrays/tree.

    • @ekbphd3200
      @ekbphd3200  2 месяца назад +1

      Very good idea! I'll have to try this.

  • @abanoubha
    @abanoubha 2 месяца назад +1

    what about Go ?

    • @ekbphd3200
      @ekbphd3200  2 месяца назад +1

      I haven't yet ventured into Go for text processing.

  • @techinsider3611
    @techinsider3611 2 месяца назад +1

    Also try mojo.

    • @ekbphd3200
      @ekbphd3200  2 месяца назад +1

      Yeah, I need to try Mojo too. I'm finding that Mojo isn't yet good at text processing. I hope and assume that it will be get better as it is developed more and more.

  • @kilianklaiber6367
    @kilianklaiber6367 2 месяца назад +1

    So rust essentially takes half the time than python....nice, but I thought rust would be a lot faster.

    • @ekbphd3200
      @ekbphd3200  2 месяца назад

      Yeah. Nearly twice as fast.

    • @0xedb
      @0xedb 2 месяца назад +1

      could be a lot faster. it all depends on what's being done and how efficient the code is. not always tho

    • @JavierHarford
      @JavierHarford 2 месяца назад +1

      I can imagine 2x is just a function of the complexity x the sample size, which makes me wonder about the curve at scale. There would also be some unrelated but important measures, such as speed of development and the effect of higher level abstractions vs lower level optimisation too

  • @patates1165
    @patates1165 4 месяца назад +2

    nice video :)