Post AG2220TdAEnHxEbBui by Suiseiseki@cum.desupost.soy
 (DIR) More posts by Suiseiseki@cum.desupost.soy
 (DIR) Post #AG21X9JuEfLOP6KufI by koakuma@uwu.social
       2022-02-01T11:42:56Z
       
       1 likes, 1 repeats
       
       Sudden realization: the JVM interpreter is not "slow". It simply has to interpret a lot of JVM bytecode at work, since most parts of Java's standard library is also written in Java itself.I guess they have to do it that way since it gives more visibility (and hence, optimization opportunities) to the JIT compiler. But it also has the effect of placing a huge load on the interpreter, which is why it can feel slow when the JIT compiler hasn't kicked in yet (or if you're running it in interpreter-only mode).Compare to, say, Python or PHP, where most of the standard library is implemented as optimized C code, and the interpreter's job is mainly just to tie them all together.
       
 (DIR) Post #AG21kjDI62M1UPiWFk by xerz@fedi.xerz.one
       2022-02-01T11:45:27.220433Z
       
       0 likes, 0 repeats
       
       @koakuma yep, pretty much. Also because they want Java to be pure, portable OOP.
       
 (DIR) Post #AG21x0pCRXqnaMJ2Ui by koakuma@uwu.social
       2022-02-01T11:47:38Z
       
       0 likes, 0 repeats
       
       Oh and AFAICT alternative Python implementations like PyPy has its standard library implemented in Python too for visibility reasons, like JVM (which is one of the reasons why PyPy in interpreted mode runs at like a third of CPython's speed) :thinkhappy:
       
 (DIR) Post #AG2220TdAEnHxEbBui by Suiseiseki@cum.desupost.soy
       2022-02-01T11:48:34.255856Z
       
       0 likes, 0 repeats
       
       @koakuma A few years ago, I had the sudden realization that C and assembly are the only good languages and finally I was able to write decent programs.
       
 (DIR) Post #AG22PQz2mMfsp8SmSu by a1ba@expired.mentality.rip
       2022-02-01T11:52:47.734972Z
       
       0 likes, 1 repeats
       
       @koakuma and that's why they say that JVM becomes only faster after some time.Android btw precompiles framework and some other libraries. But apps also get faster after ART recompiles them with profile.
       
 (DIR) Post #AG26QFFOIdbsWwkebw by koakuma@uwu.social
       2022-02-01T12:37:45Z
       
       1 likes, 1 repeats
       
       @Suiseiseki Assembly is fun but whenever I have to touch C I can never shake off this feeling that the language is actively fighting me from writing correct programs (thanks to all those weird corner cases and "gotcha!" UB moments).Maybe I'm too dumdum for it, idk lol :cirnouwu: