Mojo Is FASTER Than Rust

preview_player
Показать описание
Recorded live on twitch, GET IN

Become a backend engineer. Its my favorite site

This is also the best way to support me is to support yourself becoming a better backend engineer.

By: Mohamed Mabrouk

MY MAIN YT CHANNEL: Has well edited engineering videos

Discord

Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
Рекомендации по теме
Комментарии
Автор

How to scare a VIM user? Make them use their mouse 9:08

shinjiku
Автор

write bad code -> write optimized code in different language -> post article -> wait till prime posts it with clickbait title

CaptainOachkatzl
Автор

No performance benchmark articles or claims should be taken seriously unless they provide the full code examples, environment details, and details of all optimizations applied. Saying x is faster than y is "trust me bro" level.

ragectl
Автор

'Tensor is one eigenvalue less than elevensor'
😂

Dooezzz
Автор

"Mojo is faster than rust"
And the whole article contains just a sentence mentioning rust once that saying "I implemented it in rust and it was slower"
Let's just make jokes about the author and say like he just compiled without a release flag or something

kirillgimranov
Автор

If you're writing an article that mentions performance you have to provide all the compiler options that you used. If the rust implementation didn't have the target-cpu=native codegen flag set and the --release flag then it is an unfair comparison. And since he used a library for the rust implementation true lto would also probably improve performance. So a set of compiler flags for all languages used is needed to make it a fairer comparison.

ferdynandkiepski
Автор

The end of the blog post of viralinstruction about this benchmark sums up my thought about Mojo and Julia perfectly:

To me, Julia seems like such an obvious solution to the two-language problem in bioinformatics (and in deep learning). All the hard problems with bridging speed and dynamism have essentially been solved in Julia. At the same time, the language remains niche, mostly because it still has too many rough edges and usability issues, such as latency, the inability to statically analyse Julia or compile executable binaries. But these issues are not fundamental to the language - they're rather in the category of ordinary engineering problems. Solving them is mostly "just" a matter of putting in tens of thousands of professional dev hours, which is a matter of getting tens of millions of euros to pay for hiring people to do the job.

It does grate me then, when someone else manages to raise 100M dollars on the premise of reinventing the wheel [a.k.a. Mojo] to solve the exact same problem, but from a worse starting point because they start from zero and they want to retain Python compatibility. Think of what money like that could do to Julia!

halneufmille
Автор

Bioinformatician here (yes, it's a real field of science!). Most of us come from a bio or stats background and were then taught how to program and how to use analysis tools in grad school. Most of us are unfamiliar with low-level languages such as C or Rust because loads of us didn't have a solid CS background and the learning curve is just too steep for people whose main focus is solving biological issues and keeping up to date with literature and modern data analysis techniques. So most low-level tooling is actually made by CS people working in collaboration with bioinformaticians. I mean... think about it, low-level programming is as hard as it is for full-time computer scientists and requires loads of deep knowledge on how CPUs, memory and OSes work now couple that with also having to master the complex science which is biology, knowing how genes, transcription, translation, mutations, DNA/RNA works and large biochemical regulatory networks and you can see why Python and R are so popular in our field. The barrier of entry is much lower for people from hardcore biology backgrounds and it allows us to engineer performant enough complex data analysis pipelines without having to understand and worry about stuff like memory allocation and pointers...

gilpo
Автор

What an idiomatic pythonic nascent article this was.

thatmg
Автор

I taught a bioinformatician that he could run python or rust inside the database they were using: Postgres

He took one of his jobs and moved it to the db to skip the overhead. It was a bit more than 100 times faster than how they had been doing that task.

magfal
Автор

Mojo won't be useable until it goes Open Source and until it fulfills its promise to be an actual python superset (it still calls the underlying python runtime for pure python code)

the_mastermage
Автор

are actually faster than traditional (while and for-in) loops in python because they are very thin c-wrappers under the hood (thinner than the original ones).

djupstaten
Автор

The rust crate is searching for both '\n' and '\r' while the Mojo function is only searching for one character which defaults to '\n'. Is it any wonder the Mojo version is faster when the Rust version is doing twice the work?

psychoinferno
Автор

Bioinformatics often relies on CLI tools, embarrassingly parallel tasks, and pipelined data processing. I think Rust is positioned well for the CS/Bioinformatics methodologist, but maybe not with universal appeal given the learning curve, for data analysts.

sammysheep
Автор

I played around with Mojo after reading that article. The SIMD type doesn’t do any bounds-checking, and also doesn’t zero-out unset values. It sacrifices a lot of safety for the sake of performance.

PeterFaria
Автор

5:08 The term for idiomatic Rust should be 'Rustaceous'.

marktaylor
Автор

Watch Mojo be the name of some obscure snake species.

Endelin
Автор

According to their Github page however their implementation and needtail have pretty much the same performance (sometimes one wins, sometimes the other). Unfortunately I can't reproduce them since Mojo on my PC (WSL) immediately segfaults due to issue 1260...

Also, this is nothing particularly difficult to code: the benchmark is just measuring how fast you can read a file and split it into lines.

SciDiFuoco
Автор

The best-case scenario isn't to have a fast programming language so that data scientists can write optimized versions of their algorithms; it's to have a high-level library that does all of those optimizations for free. Way faster experimentation speed this way.

nathanielsimard
Автор

Not shwoing any of the Rust code makes this highly sus...

thekwoka