I'm putting this in DevOps for archiving, but it's for the main board also... many of you have comp sci backgrounds, though I have taken a lot of comp sci courses (my degrees are in CIS) I don't know the answer to this question: how do interpreted languages like Python and PERL handle the step after compilation where the object code needs to be linked with and libraries and subprograms needed? It would seem that this would make interpreted vs compiled languages unfeasibly slow... too slow for ... moreI'm putting this in DevOps for archiving, but it's for the main board also... many of you have comp sci backgrounds, though I have taken a lot of comp sci courses (my degrees are in CIS) I don't know the answer to this question: how do interpreted languages like Python and PERL handle the step after compilation where the object code needs to be linked with and libraries and subprograms needed? It would seem that this would make interpreted vs compiled languages unfeasibly slow... too slow for something like Firefox to be written in Python. I know interpreters have gotten a lot faster, but fast enough to ostensibly skip the link-edit step?
Frans BeylI hope this doesn't turn into a discussion on terms but lets go anyway.
As far as I know sources written in interpreted languages are never linked because they're just input to the interpreter who performs what is in them, it is the interpreter or by extension the virtual machine that executes not the script! Even if there is some kind of bytecode creation, sometimes called (pre)compiling, this bytecode never executes.
Sources written in compiled languages however are turned into machinecode obj... moreI hope this doesn't turn into a discussion on terms but lets go anyway.
As far as I know sources written in interpreted languages are never linked because they're just input to the interpreter who performs what is in them, it is the interpreter or by extension the virtual machine that executes not the script! Even if there is some kind of bytecode creation, sometimes called (pre)compiling, this bytecode never executes.
Sources written in compiled languages however are turned into machinecode objects which need linking to become executables even if they consist of one module only. The linking is not just gather all needed modules together in one executable but more important taking care of addressing, it is the created loadmodule that executes!
I have the impression that you refer to cycles needed to search and load of whichever needed component. There are many factors possibly in the game here. I don't know how java, python, perl or rexx decide at what time this process is done but they surely have intelligent algorythms to optimise this. For z/OS loadmodules there are several techniques of influence, dynamic or static load, preload, lla, vlf, .... I'm sure loadmodules are executing faster then virtual machines running bytecoded scripts and that they are probably faster loading because smaller but the main factor will be the search and load algorythm for these cycles. Don't know that in the case of Firefox the user will sense this difference.
What I see most of the time is that these 'technical' kind of cycles are peanuts compared to the ones lost by badly conceived or written code, be it scripting or coding.