Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #3435
| From | George Neuner <gneuner2@comcast.net> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: Portable Software (was: fledgling assembler programmer) |
| Date | 2023-03-28 17:26 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <23-03-034@comp.compilers> (permalink) |
| References | (4 earlier) <23-03-008@comp.compilers> <23-03-012@comp.compilers> <23-03-017@comp.compilers> <23-03-022@comp.compilers> <23-03-029@comp.compilers> |
On Tue, 28 Mar 2023 09:21:50 +0200, Hans-Peter Diettrich <DrDiettrich1@netscape.net> wrote: >On 3/26/23 1:54 AM, George Neuner wrote: >> On Sat, 25 Mar 2023 13:07:57 +0100, Hans-Peter Diettrich >> <DrDiettrich1@netscape.net> wrote: >> >>> After a look at "open software" I was astonished by the number of >>> languages and steps involved in writing portable C code. Also updates of >>> popular programs (Firefox...) are delayed by months on some platforms, >>> IMO due to missing manpower on the target systems for checks and the >>> adaptation of "configure". Now I understand why many people prefer >>> interpreted languages (Java, JavaScript, Python, .NET...) for a >>> simplification of their software products and spreading. >> >> Actually Python is the /only/ one of those that normally is >> interpreted. And the interpreter is so slow the language would be >> unusable were it not for the fact that all of its standard library >> functions and most of its useful extensions are written in C. > >My impression of "interpretation" was aimed at the back-end, where >tokenized (virtual machine...) code has to be brought to a physical >machine, with a specific firmware (OS). Then the real back-end has to >reside on the target machine and OS, fully detached from the preceding >compiler stages. That is exactly as I meant it. Python and Java both initially are compiled to bytecode. But at runtime Python bytecode is interpreted: the Python VM examines each bytecode instruction, one by one, and executes an associated native code subroutine that implements that operation. In contrast, at runtime Java bytecode is JIT compiled to equivalent native code - which include calls to native subroutines to implement complex operations like "new", etc. The JVM JIT compiles function by function as the program executes ... so it takes some time before the whole program exists as native code ... but once a whole load module has been JIT compiled, the JVM can completely ignore and even unload the bytecode from memory. >Then, from the compiler writer viewpoint, it's not sufficient to define >a new language and a compiler for it, instead it must placed on top of >some popular "firmware" like Java VM, CLR or C/C++ standard libraries, >or else a dedicated back-end and libraries have to be implemented on >each supported platform. Actually it simplifies the compiler writer's job because the instruction set for the platform VM tends not to change much over time. A compiler targeting the VM doesn't have to scramble to support features of every new CPU - in many cases that can be left to the platform's JIT compiler. >My impression was that the FSF favors C and ./configure for "portable" >code. That's why I understand that any other way is easier for the >implementation of really portable software, that deserves no extra >tweaks for each supported target platform, for every single program. Can >somebody shed some light on the current practice of writing portable >C/C++ software, or any other compiled language, that (hopefully) does >not require additional human work before or after compilation for a >specific target platform? Right. When you work on a popular "managed" platform (e.g., JVM or CLR), then its JIT compiler and CPU specific libraries gain you any CPU specific optimizations that may be available, essentially for free. OTOH, when you work in C (or other independent language), to gain CPU specific optimizations you have to write model specific code and/or obtain model specific libraries, you have to maintain different versions of your compiled executables (and maybe also your sources), and you need to be able to identify the CPU so as to install or use model specific code. For most developers, targeting a managed platform tends to reduce the effort needed to achieve an equivalent result. >DoDi George [The usual python implementation interprets bytecodes, but there are also versions for .NET, the Java VM, and a JIT compiler. -John]
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
fledgling assembler programmer Alan.Beck@darkrealms.ca (Alan Beck) - 2023-03-21 17:40 -0400
Re: fledgling assembler programmer gah4 <gah4@u.washington.edu> - 2023-03-21 17:23 -0700
Re: fledgling assembler programmer Thomas Koenig <tkoenig@netcologne.de> - 2023-03-22 06:49 +0000
Re: fledgling assembler programmer gah4 <gah4@u.washington.edu> - 2023-03-22 13:31 -0700
Re: fledgling assembler programmer Thomas Koenig <tkoenig@netcologne.de> - 2023-03-23 11:26 +0000
Re: fledgling assembler programmer gah4 <gah4@u.washington.edu> - 2023-03-24 14:17 -0700
Re: ancient PL/I, was fledgling assembler programmer drb@ihatespam.msu.edu (Dennis Boone) - 2023-03-24 22:51 +0000
Re: ancient PL/I, was fledgling assembler programmer gah4 <gah4@u.washington.edu> - 2023-03-24 22:44 -0700
Re: ancient PL/I, was fledgling assembler programmer gah4 <gah4@u.washington.edu> - 2023-03-25 01:27 -0700
Re: fledgling assembler programmer Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2023-03-25 13:07 +0100
Re: fledgling assembler programmer George Neuner <gneuner2@comcast.net> - 2023-03-25 20:54 -0400
Portable Software (was: fledgling assembler programmer) Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2023-03-28 09:21 +0200
Re: Portable Software (was: fledgling assembler programmer) arnold@freefriends.org (Aharon Robbins) - 2023-03-28 14:42 +0000
Re: configuguration tools, Portable Software (was: fledgling assembler programmer) Kaz Kylheku <864-117-4973@kylheku.com> - 2023-03-29 18:33 +0000
Re: configuguration tools, Portable Software (was: fledgling assembler programmer) arnold@skeeve.com (Aharon Robbins) - 2023-03-31 07:10 +0000
Re: configuguration tools, Portable Software (was: fledgling assembler programmer) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2023-04-02 08:56 +0000
Re: Portable Software Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2023-03-31 07:49 +0200
Re: Portable Software anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2023-04-02 10:04 +0000
Re: Portable Software Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2023-04-05 11:23 +0200
Re: Portable Software anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2023-04-05 16:30 +0000
Re: Portable Software Kaz Kylheku <864-117-4973@kylheku.com> - 2023-04-06 08:35 +0000
Re: Portable Software Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2023-04-07 15:35 +0200
Re: Portable Software Thomas Koenig <tkoenig@netcologne.de> - 2023-04-08 18:25 +0000
Re: Portable Software (was: fledgling assembler programmer) gah4 <gah4@u.washington.edu> - 2023-03-28 14:21 -0700
Re: Portable Software (was: fledgling assembler programmer) Kaz Kylheku <864-117-4973@kylheku.com> - 2023-03-29 18:34 +0000
Re: Portable Software (was: fledgling assembler programmer) George Neuner <gneuner2@comcast.net> - 2023-03-28 17:26 -0400
Re: Portable python Software (was: fledgling assembler programmer) George Neuner <gneuner2@comcast.net> - 2023-03-29 13:50 -0400
Re: Portable Software (was: fledgling assembler programmer) gah4 <gah4@u.washington.edu> - 2023-03-29 11:27 -0700
Re: Portable Software (was: fledgling assembler programmer) Thomas Koenig <tkoenig@netcologne.de> - 2023-03-31 05:19 +0000
Re: Portable Software (was: fledgling assembler programmer) gah4 <gah4@u.washington.edu> - 2023-03-31 12:41 -0700
Re: Portable Software (was: fledgling assembler programmer) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2023-03-31 16:34 +0000
Re: fledgling assembler programmer arnold@skeeve.com (Aharon Robbins) - 2023-03-23 13:56 +0000
Re: fledgling assembler programmer anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2023-03-22 10:02 +0000
Re: fledgling assembler programmer David Brown <david.brown@hesbynett.no> - 2023-03-22 14:39 +0100
Re: fledgling assembler programmer George Neuner <gneuner2@comcast.net> - 2023-03-22 14:54 -0400
csiph-web