r/rust • • Jul 10 '20

Linux Developers May Discuss Allowing Rust Code Within The Kernel

https://www.phoronix.com/scan.php?page=news_item&px=Linux-Plumbers-2020-Rust
235 Upvotes

114 comments sorted by

View all comments

Show parent comments

-5

u/AVeryCreepySkeleton Jul 10 '20

import isn't that slow when you have some precompiled cache, but yeah, that sucks. Although, I don't think any other interpreted language has amazingly fast imports because of the very same reason: they have to reinterpret the imported code.

Out of morbid curiosity, do you know of any comparisons I could check? The ones with real numbers.

5

u/[deleted] Jul 10 '20

1

u/Morrido Jul 10 '20

Just found that one now and was about to link it. lol

This one has pretty graphics: https://benchmarksgame-team.pages.debian.net/benchmarksgame/which-programs-are-fastest.html

1

u/AVeryCreepySkeleton Jul 10 '20

What? PHP wins? My world is shattered, I need a drink...

Wait, it still beats Ruby! I always knew that.

2

u/Morrido Jul 10 '20

PHP is, or used to be, just a thin layer over an 100% C API. I'm pretty sure if you start using exceptions, classes and all the extra stuff, you start getting slower.

Node.js is the one that surprises me the most. They have almost compiled language performance there.

4

u/AVeryCreepySkeleton Jul 10 '20

They have almost compiled language performance there.

Which might be just what happens there. JIT and all that.

1

u/Morrido Jul 10 '20

I was trying to find one, but I couldn't. I remember PHP being somewhat faster due to just being a mostly thin layer over C. But that was also before PHP6/7. I remember Lisp being pretty speedy as well.

1

u/AVeryCreepySkeleton Jul 10 '20

On the other hand, Lisp syntax is about as minimalist as you can get :)

Well, given that nobody seems to have hard numbers (I couldn't find either), I guess it's yet another instance of "there are two kinds of programming languages: the ones everybody complains about and the ones nobody uses".

2

u/masklinn Jul 10 '20

On the other hand, Lisp syntax is about as minimalist as you can get :)

I would say Forth goes a bit further still.

1

u/AVeryCreepySkeleton Jul 10 '20

Pfff, take that. It is also interpreted lang :P

2

u/masklinn Jul 10 '20

Forth is not an esolang though.

1

u/AVeryCreepySkeleton Jul 10 '20

Questionable.

2

u/masklinn Jul 10 '20

In no sense of the word.

1

u/AVeryCreepySkeleton Jul 10 '20

I see.

<Reads Wikipedia...>

<Enlightenment achieved...>

<Gets to rewriting his scripts in Forth. He's a lost cause...>

1

u/Morrido Jul 10 '20

Oh, I'm not complaining. I actually love Python. I just don't expect it to be fast, lol.

1

u/AVeryCreepySkeleton Jul 10 '20

That's cool, I love it too! I just think it's kinda sad that people make this kind of assertions whereas the thing that matters most is the C libraries the lang is based on.

2

u/Morrido Jul 10 '20

Well, that and sometimes python just isn't the bottleneck. You might be doing enough I/O for your language of choice to not matter. Or you might just want to whip up a prototype really quick to check your idea for soundness before jumping into the swamp to fight for performance.

2

u/AVeryCreepySkeleton Jul 10 '20

Right.

With the ultimate question answered, we can die peacefully. Thanks for the talk :)