Click here to Skip to main content
16,021,209 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralYou can't have sh*t in Redmond anymore! Pin
honey the codewitch2hrs 16mins ago
mvahoney the codewitch2hrs 16mins ago 
GeneralRe: You can't have sh*t in Redmond anymore! Pin
David O'Neil1 hr 52mins ago
professionalDavid O'Neil1 hr 52mins ago 
GeneralRe: You can't have sh*t in Redmond anymore! Pin
honey the codewitch1 hr 51mins ago
mvahoney the codewitch1 hr 51mins ago 
GeneralRe: You can't have sh*t in Redmond anymore! Pin
David O'Neil1 hr 25mins ago
professionalDavid O'Neil1 hr 25mins ago 
GeneralRe: You can't have sh*t in Redmond anymore! Pin
Mike Hankey1 hr 34mins ago
mveMike Hankey1 hr 34mins ago 
GeneralRe: You can't have sh*t in Redmond anymore! Pin
honey the codewitch1 hr 34mins ago
mvahoney the codewitch1 hr 34mins ago 
GeneralLearning C# or really .net, confirm for me my suspicions Pin
charlieg4hrs 5mins ago
charlieg4hrs 5mins ago 
GeneralRe: Learning C# or really .net, confirm for me my suspicions Pin
David O'Neil3hrs 55mins ago
professionalDavid O'Neil3hrs 55mins ago 
GeneralRe: Learning C# or really .net, confirm for me my suspicions Pin
charlieg3hrs 46mins ago
charlieg3hrs 46mins ago 
GeneralRe: Learning C# or really .net, confirm for me my suspicions Pin
trønderen2hrs 59mins ago
trønderen2hrs 59mins ago 
A small remark slighly on the side:

I never before heard dotNet IL (Intermediate Language) referred to as "P-code".

The term "P-code" was made famous by the Pascal compiler of 1970 (or thereabouts), generating code for execution on a virtual machine. Writing an interpreter (i.e. the virtual machine) for the Pascal P-code was quite simple; there were interpreters for dozens of machine architectures. The version that became prominent was called P4; it was the 4th version of P-code for the original Pascal compiler.

I even believe that some people replaced the microcode of the LSI-11, the single chip version of the PDP-11 architecture, with alternative microcode to interpret P4 directly without the need for an interpreter - but if my memory is correct, this solution was slower than the interpreter running on the LSI-11 with the original microcode and an interpreter on top Smile | :)

P-code, or "bytecode" in general, is designed to be treated as the instruction set of a virtual machine, executed "as is".
dotNet IL is certainly not meant for execution as is on a virtual machine. I will not say that it is impossible, but it most certainly is pointless and extremely inefficient. IL is not a P-code or bytecode, but "source code" for the jitter - the Just In Time code generator, translating IL into native machine code for whatever CPU the jitter is run on, immediately before execution.

This probably is not at all significant to the OP. Maybe he will later get in touch with dotNet IL. When/if that happens, he should not believe that IL is interpreted the way P-code is.

End remark:

P-code/bytecode interpretation is certainly slower than native code, in some circumstances a lot slower. With C# - and all other dotNet languages - having the jitter generating native code, it had a speed advantage over Java, which used to interpret Java bytecode. You could compile Java to native code from the beginning, or at least very early, but then you got a binary that couldn't execute on any other architecture, and couldn't utilize e.g. optional instructions available on a specific machine. Java byte code could be moved freely around to any machine with an interpreter.

To be able to compete with C# on speed, the JVM (Java Virtual Machine) was extended with the capability of rather than executing the byte code as is, it started out by processing the byte code further, into native code for the current machine. This improved the execution speed significantly. However, Java bytecode wasn't designed for this use, and a lot of useful information for generating efficient machine code has been thrown away (as the machine code already has been generated, although for the virtual machine!) So in the general case, the dotNet jitter is in a much better position to generate optimal code, with much more information available.

After Java began processing its bytecode into native code before starting execution, lots of other bytecode based systems have followed, processing their bytecode to native code before execution.
Religious freedom is the freedom to say that two plus two make five.

GeneralRe: Learning C# or really .net, confirm for me my suspicions Pin
PIEBALDconsult3hrs 51mins ago
mvePIEBALDconsult3hrs 51mins ago 
GeneralRe: Learning C# or really .net, confirm for me my suspicions Pin
Mycroft Holmes3hrs 7mins ago
professionalMycroft Holmes3hrs 7mins ago 
GeneralRe: Learning C# or really .net, confirm for me my suspicions Pin
honey the codewitch2hrs 55mins ago
mvahoney the codewitch2hrs 55mins ago 
GeneralRe: Learning C# or really .net, confirm for me my suspicions Pin
charlieg1 hr 3mins ago
charlieg1 hr 3mins ago 
GeneralRe: Learning C# or really .net, confirm for me my suspicions Pin
honey the codewitch1 hr ago
mvahoney the codewitch1 hr ago 
GeneralWhere is... Pin
Richard Andrew x645hrs 2mins ago
professionalRichard Andrew x645hrs 2mins ago 
GeneralRe: Where is... Pin
raddevus4hrs 50mins ago
mvaraddevus4hrs 50mins ago 
GeneralRe: Where is... Pin
Richard Andrew x644hrs 46mins ago
professionalRichard Andrew x644hrs 46mins ago 
GeneralRe: Where is... Pin
raddevus4hrs 40mins ago
mvaraddevus4hrs 40mins ago 
GeneralRe: Where is... Pin
raddevus4hrs 33mins ago
mvaraddevus4hrs 33mins ago 
GeneralRe: Where is... Pin
PIEBALDconsult3hrs 31mins ago
mvePIEBALDconsult3hrs 31mins ago 
GeneralRe: Where is... Pin
Peter_in_27803hrs 12mins ago
professionalPeter_in_27803hrs 12mins ago 
GeneralRe: Where is... Pin
charlieg4hrs 14mins ago
charlieg4hrs 14mins ago 
GeneralRe: Where is... Pin
PIEBALDconsult3hrs 38mins ago
mvePIEBALDconsult3hrs 38mins ago 
GeneralRe: Where is... Pin
Mike Hankey3hrs 36mins ago
mveMike Hankey3hrs 36mins ago 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.