3 ms·
> ChatGPT-3 is predominantly written in Python Is it? Do you have references? Isn't all the number crunching written in C++ and "only" the orchestration in Pyt
by Rochus 4y ago
> ChatGPT-3 is predominantly written in Python
Is it? Do you have references? Isn't all the number crunching written in C++ and "only" the orchestration in Python?
But essentially it is a reasonable view.
There were already studies about energy consumption related to programming languages, see https://www.sciencedirect.com/science/article/pii/S0167642321000022 https://www.sciencedirect.com/science/article/pii/S016764232... and https://dl.acm.org/doi/abs/10.1145/3136014.3136031 https://dl.acm.org/doi/abs/10.1145/3136014.3136031.
In the 2017 version of the study Go is far behind Rust or even Java, and there is even a factor 23 (instead of 17) from Go to Python in energy consumption. So if you really want to reduce the CO2 footprint then you should rather use Rust or C++ instead of Go, where the factor is about 76.
- steveklabnik 4y agoThis paper is very bad. I wish people would stop citing it. There’s serious methodological flaws. And yes I say that even though Rust performs very well in it.
- coldtea 4y ago"There’s serious methodological flaws" such as?
- steveklabnik 4y agoThe largest one is that it is measuring benchmark game programs. There is no reason to believe that those style of programs are representative of all programs. Furthermore, there’s very weird results as well. Why is TypeScript so much worse than JavaScript? TypeScript is a superset of JavaScript and compiles to it. The JavaScript program could be exactly the same as the TypeScript one, but isn’t for some reason. It’s been a while and I’m on my phone so I can’t check, but IIRC the reason the above is even a question is that they made a benchmarking framework but didn’t share it, so nobody can reproduce their results.
- vorpalhex 4y ago> Why is TypeScript so much worse than JavaScript? TypeScript is a superset of JavaScript and compiles to it Typescript produces garbage JS output that creates all sorts of weird bugs, hiccups and strange quirks. It doesn't surprise me that TS generated JS would perform much worse than directly written JS.
- steveklabnik 4y agoEven if you take a JavaScript file and run it through tsc, it adds stuff? That is indeed surprising to me! It wouldn’t shock me that there were differences if you used a bunch of fancy TypeScript features, but at the limit I would expect no overhead if you don’t use any of them. Maybe that expectation is misguided.
- rcme 4y agoIt depends on your compiler settings but the code can very closely match equivalent JS if you want.
- Rochus 4y agoThese are not "serious methodological flaws"; you do not consider the results credible, which might be justified or not, it's an opinion.
- misnome 4y agoWe had a session at a recent biochemistry scientific software conference where someone was spending a lot of time in “more of a comment than a question” questions pushing that this paper meant that everyone should stop writing python and go back to Fortran.
- deleted 4y ago[deleted]
- Rochus 4y agoI cannot confirm your assessment. The paper has some little flaws - as all papers do - but the method and results are interesting and relevant. As with all performance measurements - or measurements in general - there is a measurement error. As engineers we have learned to cope with such errors.