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

43

u/flying-sheep Jul 10 '20 edited Jul 10 '20

Aah there, thank you! Somehow I missed that phoronix even has those lol

/Edit: wow those comments are dumb:

  • so when is Python allowed in

    Because obviously adding a systems programming language is a slippery slope that leads directly to the inclusion of a slow interpreted language

  • rust is dumb because it has let varname: type syntax instead of type varname syntax

    Because that was decided for shits and giggles instead of being a familiar choice made in many languages for rational reasons.

Or they decided that every single post there has to be satirical…

-11

u/AVeryCreepySkeleton Jul 10 '20

To give it justice, Python is pretty snappy for interpreted language. Given such packages as pandas, I would hesitate to call it slow.

21

u/Morrido Jul 10 '20

I'm pretty sure Python is notoriously slow even when compared with other interpreted languages, but it pulls ahead because it is somewhat easy to FFI into C and do the heavylifting there.

I remember every use of import causing a noticeable slowdown on the program, which can be a dealbreaker if you're coding something that just takes and input from stdin and spits out something to stdout before exiting.

-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.

→ More replies (0)

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.

→ More replies (0)

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.

→ More replies (0)