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

  Рет қаралды 904

EKB PhD

EKB PhD

Күн бұрын

Rust is a badboy systems language, so I assume it's faster than Python when calculating the word association metric log dice. But, how much faster is it with this particular linguistic task?
Here's my Rust script (with generous help from my son):
github.com/ekbrown/scripting_...
Here's my Python script:
github.com/ekbrown/scripting_...
#corpuslinguistics #rustlang #python

Пікірлер: 14
@NoX-512
@NoX-512 9 күн бұрын
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 6 күн бұрын
Very good idea! I'll have to try this.
@patates1165
@patates1165 2 ай бұрын
nice video :)
@ekbphd3200
@ekbphd3200 2 ай бұрын
Thanks!
@abanoubha
@abanoubha 24 күн бұрын
what about Go ?
@ekbphd3200
@ekbphd3200 20 күн бұрын
I haven't yet ventured into Go for text processing.
@techinsider3611
@techinsider3611 18 күн бұрын
Also try mojo.
@ekbphd3200
@ekbphd3200 17 күн бұрын
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 24 күн бұрын
So rust essentially takes half the time than python....nice, but I thought rust would be a lot faster.
@ekbphd3200
@ekbphd3200 20 күн бұрын
Yeah. Nearly twice as fast.
@0xedb
@0xedb 16 күн бұрын
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 күн бұрын
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
How big is a "small" dictionary in Mojo lang?
7:20
EKB PhD
Рет қаралды 1,5 М.
Is it worth it to call Rust from Python with PyO3?
8:50
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 62 МЛН
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 57 МЛН
How much faster has Mojo's dictionary gotten?
7:40
EKB PhD
Рет қаралды 2,5 М.
Rust Demystified 🪄 Simplifying The Toughest Parts
14:05
Code to the Moon
Рет қаралды 177 М.
Rust for TypeScript devs : Borrow Checker
8:49
ThePrimeagen
Рет қаралды 218 М.
Why is Mojo's dictionary slower (!) than Python's?
12:16
EKB PhD
Рет қаралды 4 М.
Has Generative AI Already Peaked? - Computerphile
12:48
Computerphile
Рет қаралды 910 М.
Combining Rust and Python: The Best of Both Worlds?
11:08
ArjanCodes
Рет қаралды 69 М.
The Rust Standard Library is SO Confusing...Until Now!
11:45
Travis Media
Рет қаралды 26 М.
How To Make Your Python Packages Really Fast With RUST
5:16
Isaac Harris-Holt
Рет қаралды 39 М.
Rust: When C Code Isn't Enough
8:26
CodeAhead
Рет қаралды 156 М.
the TRUTH about this NEW Language (BETTER Than Rust and C++?)
7:37
Low Level Learning
Рет қаралды 351 М.
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 62 МЛН