Hacker News new | ask | show | jobs
by PDoyle 2998 days ago
Pre-emptive runtimes are hard. Inserting yield points judiciously in loops isn't that incredibly difficult, and neither is reducing the cost of a yield point. It's far harder to make sure every machine instruction in every part of the runtime is prepared to be interrupted and have all it assumptions violated by the time it resumes.
2 comments

> Inserting yield points judiciously in loops isn't that incredibly difficult, and neither is reducing the cost of a yield point.

The Go team has done both over the past few years but we haven't been happy enough with the performance. Hence Austin's proposal.

Imagine how much simpler and faster a runtime could be if every function was split into a series of non interruptible blocks. Sure, a bit tricky with loops, you'd have to cap them to make sure they are not hogging the system and you don't introduce too much overhead. But small price to pay for not wasting years of man-hours on silly low level stuff and barely achieving usable results.