hi,
recently when describing pike i wrote the following:
pike is a classical all purpose language, which contrary to php or perl was designed from the beginning to write large complex applications. pike is rather fast because it is optimized strongly for the individual machines. (the produced bytecode is machine dependant, (contrary to eg python and java which produce machine independant bytecode, and are therefore slower))
(i hope that is correct)
interresting was a reply that said:
ah. this language closes the gap between compilerlanguages and unoptimized interpreted languages.
i have never looked at pike from this perspective sounds like an interresting observation.
what do you think?
greetings, martin.
It's flattering but not very accurate, I'm afraid. I'd say it's still clearly an interpreted/scripting language which uses machine code as an optimization among several others. Afterall, the machine code is essentially only a list of calls to opcode functions and not inlined code that does the operations themselves (with a few exceptions for really trivial opcodes).
The runtime typing will keep it that way. It's no use inlining the opcode functions when each has to do complete type checking on every argument - it'd only be large code duplication to save a function call and maybe some stack handling for the arguments. In theory it's possible to do better in areas where the programmer has used strong compile-time typing (no mixed, no int|string etc) but it'd be a lot of work to implement it. It'd also require that we introduce some sort of smallint type since a normal int can be a native integer or a bignum object which requires runtime type checking in itself.
Doesn't Java try to fill that gap? It's strongly typed and designed to be possible to optimize to machine code. Are there still no tools that can do that successfully?
/ Martin Stjernholm, Roxen IS
Previous text:
2003-10-25 00:55: Subject: pike fills a gap?
hi,
recently when describing pike i wrote the following:
pike is a classical all purpose language, which contrary to php or perl was designed from the beginning to write large complex applications. pike is rather fast because it is optimized strongly for the individual machines. (the produced bytecode is machine dependant, (contrary to eg python and java which produce machine independant bytecode, and are therefore slower))
(i hope that is correct)
interresting was a reply that said:
ah. this language closes the gap between compilerlanguages and unoptimized interpreted languages.
i have never looked at pike from this perspective sounds like an interresting observation.
what do you think?
greetings, martin.
/ Brevbäraren
but this only means that pike could be optimized even more and it is not as optimized as compiled languages. this does not contradict pike being more optimized than other interpreted languages. if pike is not more optimized then my statement was false to begin with.
as for java, would it not loose its platform independance if optimized to machine code? there are java compilers but those produce regular platformdependant binaries, killing one of the advantages of java.
greetings, martin.
Pike might be more optimized than Perl and Python but that doesn't make it fill a different gap in the sense that I believe the person who wrote
this language closes the gap between compilerlanguages and unoptimized interpreted languages.
meant. Well, perhaps if one interprets "unoptimized interpreted languages" literally. But then Perl or Python don't count as unoptimized either.
There's probably a difference in the amount of optimization but that doesn't make Pike qualitatively different since it's not _designed_ to allow a different level of optimization.
as for java, would it not loose its platform independance if optimized to machine code?
Only if it's saved and those binaries are used for distribution. I've gathered that JIT compilers are common, and there the machine dependent code is only kept in RAM.
Pike wouldn't be platform independent either if the dumped files were the common way of distribution.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-10-25 16:00: Subject: Re: pike fills a gap?
but this only means that pike could be optimized even more and it is not as optimized as compiled languages. this does not contradict pike being more optimized than other interpreted languages. if pike is not more optimized then my statement was false to begin with.
as for java, would it not loose its platform independance if optimized to machine code? there are java compilers but those produce regular platformdependant binaries, killing one of the advantages of java.
greetings, martin.
/ Brevbäraren
pike-devel@lists.lysator.liu.se