On 13-08-08 11:54 AM, Brian Anderson wrote:
Hey there.
Today we've turned on the new runtime, written in Rust, for all Rust
programs. This completely replaces the old task scheduler written in
C++. This is an important milestone in the ongoing [I/O rewrite], and
there are a lot of feature and perf changes in the air, so now's a good
time to update everybody on the state of things and what's going to be
happening for the remainder of the year.
Congratulations! This has been really impressive to watch coming together.
## The current status
It's not even close to done yet, sadly, but I'm confident we've laid a
solid groundwork for the future, and things will improve quickly from
here. There aren't a lot of immediate benefits, though tasks are now
migrated across threads by the scheduler, whereas in the old scheduler a
single task was always run in the same thread.
That's actually a pretty big benefit! It's something we've failed to
achieve in every iteration of the runtime till now, and something
everyone expects of a language in this space.
Basically, the focus for the last two
months has been on transitioning to the new scheduler and not on
performance.
Agreed. Please everyone don't assume this will be faster yet. It may
well be a little slower for a while still. The new structure is the
important part.
Despite all these caveats I have a very strong sense that writing the
runtime in Rust will go a long way to validate Rust in the domains it's
aiming for: concurrent and systems programming. Even in the task
scheduler, where there's quite a bit of unsafe code, the shared-nothing
nature of unique types forces you to consciously break the type system
to share memory, and that seems to go a long way to making parallel
programming easier to reason about.
Yes, even just reading it seems much clearer since the mutability,
lifetime and ownership of each value and reference is spelled out, not
just "some Foo* that you have to remember special validity rules about".
It's noticeably easier to reason about. Really interesting!
This progress owes a lot to three of our interns: Aaron Todd, Eric Reed
and Ben Blum, who have been doing most of the feature work on the
runtime this summer.
Congratulations to you all as well. This has been an exceptional team
effort, I think we're all excited and looking forward to giving this
code a workout.
(Incidentally, the code is also _really nice_. Kudos all around for
extensive docs, modularization, unit tests, clear naming, reasonably
isolated bits of unsafe code, etc. etc.)
-Graydon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev