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

Описание к видео Wait, what?! Python is quicker than Rust when calculating MATTR lexical diversity

I benchmark Rust by itself, Rust when called from Python with PyO3, and Python by itself (as well as Mojo and Julia) when calculating the MATTR lexical diversity measure (MATTR = Moving Average Type to Token Ratio).

Here's my Rust function:
https://github.com/ekbrown/scripting_...

Here's my Python script:
https://github.com/ekbrown/scripting_...

Here's the PyO3 Rust crate:
https://pyo3.rs/v0.22.2/

My Mojo and Julia scripts are linked to from my previous video linked to below.

#pythonprogramming #rustlang #corpuslinguistics

Комментарии

Информация по комментариям в разработке