News for hackers. Stuff that matters.
Re:Transmission torrent client ported to C++ by lionkor on Monday September 13, 2021 @03:47AM (#28508851)
if "fast" was the only requirement we would be writing it in assembly
Re:Transmission torrent client ported to C++ by zucker42 on Monday September 13, 2021 @10:46AM (#28512158)
"Fast" is never the only requirement but often is a requirement. And the problem with a slow library is you don't know when rewriting the program to not use the library will be necessary to achieve the desired performance.
Re:Transmission torrent client ported to C++ by tempodox on Monday September 13, 2021 @07:20AM (#28510063)
Nope, folks didn't invent higher-level programming languages (the first of which was arguably Fortran, see case in point [1]) because they wanted their code to run slower.

In fact, if “fast” is the most important requirement we'll probably write it in Fortran or C++. With C++ you just have to know which parts not to use.

[1] Fortran Web Framework https://news.ycombinator.com/item?id=28509333

Re:Transmission torrent client ported to C++ by rbanffy on Monday September 13, 2021 @06:42AM (#28509791)
If fast were the only requirement, we’d have vastly different processor and memory architectures and we’d probably write in higher level languages with compilers that would also generate the optimal ISA to be compiled into architecture-specific microcode along with the binary that runs on it with enough information the OS can pick which part of the heterogeneous machine is best suited to run the program.
Re:Transmission torrent client ported to C++ by tekknik on Monday September 13, 2021 @10:22PM (#28519458)
No OS, it’s too slow. The binary needs to bootstrap the machine as well.