| |
| ▲ | nicoburns a day ago | parent | next [-] | | Because it's more memory efficient than most other languages. So you can achieve the same result with lower RAM requirements. | |
| ▲ | Betelbuddy a day ago | parent | prev | next [-] | | The efficiency... https://users.rust-lang.org/t/energy-consumption-in-programm... | | |
| ▲ | xnorswap a day ago | parent | next [-] | | I see that's from almost 10 years ago, it would be interesting to see how that's changed with improvements to V8, python and C# since. Also, Typescript 5 times worse than Javascript? That doesn't really make sense, since they share the same runtime. | | |
| ▲ | embedding-shape a day ago | parent [-] | | Why is that so unbelievable? TypeScript isn't JavaScript, and while they have the same runtime, compiled TypeScript often don't look like how you'd solve the same problem in vanilla JS, where you'd leverage the dynamic typing rather than trying to work around it. See this example as one demonstration: https://www.typescriptlang.org/play/?q=8#example/enums The TS code looks very different from the JS code (which obviously is the point), but given that, not hard to imagine they have different runtime characteristics, especially for people who don't understand the inside and outs of JavaScript itself, and have only learned TypeScript. | | |
| ▲ | xnorswap a day ago | parent [-] | | Enums are one of only a few places where there is significant deviation, I don't believe that makes it 400% less efficient. | | |
| ▲ | embedding-shape a day ago | parent [-] | | Maybe read the paper and see if you can figure out their reasoning/motivation :) https://dl.acm.org/doi/10.1145/3136014.3136031 One thing to consider, is that with JavaScript you put it in a .js file, point a HTML page at it, and that's it. TypeScript uses a ton more than that, which would impact the amount of energy usage too, not to mention everything running the package registries and what not. Not sure if this is why the difference is bigger, as I haven't read the paper myself :) But if you do, please do share what you find out about their methodology. |
|
|
| |
| ▲ | Zababa a day ago | parent | prev [-] | | This image comes from running the different versions of the benchmark games programs. Some of the difference between languages may actually be just algorithmic differences, and also those programs are in general not representative of most of the software that runs. |
| |
| ▲ | gck1 a day ago | parent | prev [-] | | That, and also because rust compiler is a very good guardrail & feedback mechanism for AI. I made 3 little tools that I use for myself without knowing how to write a single rust line myself. | | |
| ▲ | Imustaskforhelp a day ago | parent [-] | | I can see that a reality but I am more comfortable using Golang as the language compared to rust given its fast compile times and I have found it to be much more easier to create no-dependices/fewer-dependencies project plus even though I wouldn't consider myself a master in golang, maybe mediocre, I feel much easier playing with golang than rust. The resource consumption b/w rust and golang would be pretty minimal to figure out actually for most use cases imho. |
|
|