So, how much of those gains comes from using the equivalent of malloc/free (FTA: “The most dangerous ArrayPool mistake is forgetting to return arrays. Unlike regular arrays that get garbage collected automatically, pooled arrays must be explicitly returned”), and how much from having pools of a memory blocks of various sizes?
If the former is a significant part, wouldn’t it be useful to just add that to .NET? One would need runtime guards to prevent use after free, but I think at least the “alloc temp buffer for use by function” case isn’t a nightmare to implement (for those working on the .NET runtime)
You can do manual memory management in .NET since the early days, it was designed to support C++ as well, first with Managed Extensions for C++, and then C++/CLI on .NET 2.0
So there were ways to do it, but not as straightforward from C# and co.
What Microsoft has been doing since the Core rewrite is exposing those capabilities in a more natural way, especially since C++/CLI is Windows only as it relies on Visual C++ backend.
As for the use after free, you can get a bit around it with using and Roslyn analysers, but yeah it would be better if directly supported on the language.
Note that manual memory management is exposed via System.Runtime.InteropServices.Marshal class. It exposes several ways to do it.
That may be not that amazing for a shipwreck in the Øresund. According to Wikipedia, its maximum depth is 40m (130’) (https://en.wikipedia.org/wiki/Øresund), so chances are a lot of it is less deep. There also may be sampling bias, with shipwrecks in shallower water being more likely to be found, and, if the tides flow faster in deeper water, survivorship bias.
ships are less likely to wreck in deep water. Storms can sill overturn them (though if they are unstable getting to deep water is questionable). You mostly expect wrecks from hitting rocks on the bottom. Though in war time sinking happens in deep water.
Too late to edit, but there is one more factor: even in war, the easiest way to find an enemy ship is when it is leaving port. Thus you would expect even in war time the battles are mostly in shallow water just because that is usually what you find around good ports. (Today with radar, satellite and such finding ships at sea isn't nearly as hard, but it is still not easy if the other isn't cooperating)
“On BBC's Top Gear programme in 2002, Jeremy Clarkson said, "I have to say, absolute hand on heart, I've never had so much fun in a car, really and truthfully, and I don't think I'd ever tire of it."”
> making it easy to compare execution strategies and choose the best one
Once your CPU has pipelining and out-of-order execution (which they will, of speed is an issue), that easy gets out, no matter what instruction set your CPU uses.
Fast code also often needs to be adjusted depending on the size and timing of various caches. That’s no different with RISC-V.
I also expect that RISC-V will have warts in its instruction set, if it doesn’t already have them.
For example, there’s the idea of instruction fusion, where the CPU treats a pair of instructions as a single one. If you’re writing assembler, whether your specific CPU fuses an instruction pair can affect what the fastest code is.
Pretty much this, in superscalar, OoO, uOP era with branch predictors the whole RISC vs CISC debate is just matter of amount of silicon used for decoders on die.
“According to the U.S. Energy Information Administration, the LCOE for advanced nuclear power was estimated at $110/MWh in 2023 and forecasted to remain the same up to 2050, while solar PV estimated to be $55/MWh in 2023 and expected to decline to $25/MWh in 2050. Onshore wind was $40/MWh in 2023 and expected to decline to $35/MWh in 2050 making renewables significantly cheaper in many cases. Similar trends were observed in the report for EU, China and India.”
I think the only thing that may be able to beat this is nuclear fusion, and that’s hypothetical at the moment.
And even that may be undesirable. If fusion requires huge plants, it may put power (literally and figuratively) into only a few hands.
Recycling of solar panels and glass-fiber wings is an issue, though.
The cheapest solar auction to date was $13 per MWh (middle east) - so utility solar in the best regions is already very very cheap. When you add 4hr batteries, it's still competitive with CCG gas - in the $50 range.
The cost models for first generation fusion plants show ¬$400 per MWh - it will take a while for them to get to reasonable cost levels.
Recycling of mono-crystalline solar (the dominant tech today) and modern turbine blades are solved problems.
Given the low information density of tactile graphics (eyes can resolve finer details than fingers, so braille letters are large, dithering isn’t useful in small areas, etc), it’s even more important to know what you want to show in an image, though, so that you can leave out the rest.
“During the Mexican–American War, Juan Antonio led his warriors to join Californios led by José del Carmen Lugo in attacking their traditional enemy, the Luiseño. Lugo led this action in retaliation for the Pauma Massacre, in which the Luiseno had killed 11 Californios. The combined forces staged an ambush and killed 33–40 Luiseno warriors, an event that became known as the Temecula Massacre of 1847. (Historians disagree on the exact number of deaths; Luiseno oral tradition holds that more than 100 warriors were killed.) In the treaty ending the war with Mexico, the US promised to honor Mexican land grants and policies. These included recognition of Native American rights to inhabit certain lands, but European-American encroachment on Indian lands became an increasing problem after the US annexed California.
[…]
In addition to the influx of Anglo-American miners, ranchers and outlaws, and groups of Mormon colonists, the Cahuilla came into conflict with the neighboring Cupeño tribe to the west. In November 1851, the Garra Revolt occurred, wherein the Cupeno leader Antonio Garra attempted to bring Juan Antonio into his revolt. Juan Antonio, friendly to the Americans, was instrumental in capturing Garra, ending that revolt.
When the California Senate refused to ratify an 1852 treaty granting the Cahuilla control of their land, some tribal leaders resorted to attacks on approaching settlers and soldiers. Juan Antonio did not participate in this as long as he lived.
To encourage the railroad, the U.S. government subdivided the lands into one-mile-square sections, giving the Indians every other section. In 1877 the government established reservation boundaries, which left the Cahuilla with only a small portion of their traditional territories.”
If the former is a significant part, wouldn’t it be useful to just add that to .NET? One would need runtime guards to prevent use after free, but I think at least the “alloc temp buffer for use by function” case isn’t a nightmare to implement (for those working on the .NET runtime)
reply