News for hackers. Stuff that matters.
Re:Rust: Dropping heavy things in another thread can make yo... by ckcheng on Saturday May 30, 2020 @04:31PM (#23364412)
>As an aside, compilers have used the trick of not free-ing data structures before, because it provides a significant performance boost. Instead of calling free on all those billions of tiny data structures a compiler would generate during its lifetime, they just let them leak. Since a compiler is short lived its not a problem, they get a free lunch (pun unintended), and the OS takes care of cleaning up after all is said and done. My point is that this post isn't theoretical, we do deallocation trickery in the real world.

This reminds me of the exploding ultimate GC technique [1]:

> on-board software for a missile...chief software engineer said "Of course it leaks". ... They added this much additional memory to the hardware to "support" the leaks. Since the missile will explode when it hits its target or at the end of its flight, the ultimate in garbage collection is performed without programmer intervention.

[1]: https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98...

Re:Rust: Dropping heavy things in another thread can make yo... by all-fakes on Saturday May 30, 2020 @07:45PM (#23365871)
Yes, Java also has a garbage collector that does nothing, called the Epsilon GC, intended for short-lived programs and references for garbage collector benchmarks.[0]

[0]: https://blogs.oracle.com/javamagazine/epsilon-the-jdks-do-no...

Re:Rust: Dropping heavy things in another thread can make yo... by inopinatus on Saturday May 30, 2020 @08:29PM (#23366108)
The bumper sticker is “Ada programmers prove the algorithm terminates.”
Re:Rust: Dropping heavy things in another thread can make yo... by blub on Sunday May 31, 2020 @04:18AM (#23368076)
I guess the bigger question is why they use dynamic memory allocation in the first place.