Wait, what?! Python is quicker than Rust when calculating MATTR lexical diversity

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024

ความคิดเห็น • 4

  • @pyajudeme9245
    @pyajudeme9245 3 หลายเดือนก่อน +2

    Awesome, I was waiting for that video! I thought that Python's GIL blocking in your last video had a much stronger effect. I guess strings are in all programming languages pretty horrible, because utf-8 doesn't have a fixed byte size, so all programming languages have to use the slow techniques that python uses for all data types. Python is pretty good compared to other languages when talking about dicts and strings. The rest is very slow, but thanks God, it is very simple to speed it up if you need it.

    • @ekbphd3200
      @ekbphd3200  3 หลายเดือนก่อน

      Yeah, I guess so. Python continues to impress.

  • @AndyQuinteroM
    @AndyQuinteroM 3 หลายเดือนก่อน

    Great video, but the result is interesting. Mind if I can get eh full main.rs file and dataset. Would love to run the tests my self and perhaps improve upon it

    • @ekbphd3200
      @ekbphd3200  3 หลายเดือนก่อน

      Sure thing! Any feedback that you have is welcome! I'm trying to improve my ability in Rust, so anything you see that could be done better, please let me know.
      Here's the main file:
      github.com/ekbrown/scripting_for_linguists/blob/main/main_mattr_native_rust.rs
      And here's the text file from the Spotify Podcast dataset that I used:
      github.com/ekbrown/scripting_for_linguists/blob/main/0a0HuaT4Vm7FoYvccyRRQj.txt