jit

What kind of optimizations do both the C# compiler and the JIT do?

I'm continuing my work on my C# compiler for my Compilers Class. At the moment I'm nearly finished with the chapters on Compiler Optimizations in my textbook. For the most part, my textbook didn't have Just-In-Time compilation in mind when it was written and I'm curious about the kinds of static, pre-jit optimizations the C# compiler...

Java Optimizations

Hi, I am wondering if there is any performance differences between String s = someObject.toString(); System.out.println(s); and System.out.println(someObject.toString()); Looking at the generated bytecode, it seems to have differences. Is the JVM able to optimize this bytecode at runtime to have both solutions providing same perfor...

Running 32 bit app using 32 bit com on a 64 bit Windows machine

Hi, I have a C# application using C++ COM object both build on a 32 bit machine. Now I have to run them on a 64 bit machine. I registered the COM object. A corresponding entry was created in the register under computer\hkey_classes_root\wow6432node\clsid{xxx}. However, when I try to run the application it says that |"Retrieving the COM ...

How would you improve Dalvik? Android's Virtual Machine

Hi All, I am currently writing a paper on the Android platform. After some research, it's clear that Dalvik has room for improvement. I was wondering, what do you think would be the best use of a developer's time with this goal? JIT compilation seems like the big one, but then i've also heard this would be of limited use on such a low...

How to detect an unmanaged app has aborted

I have a C# app which invokes an unmanaged C++ application via Process.Start() On some machines, if this C++ app aborts, I'm left with the Just-In-Time error dialog showing Is there a way from C# to detect that the C++ app has errored and just restart it (I don't have the source to and therefore can't modify the C++ app) ...

Native code execution by JVM/CLR

How does JVM/CLR execute JIT compiled native code? Is it by some code injection or by copying code to executable memory? What are the system calls that allows dynamic code execution? ...

Does the .NET JIT optimize nested try/catch statements?

Hello: I've been thinking about nested try/catch statements and started to think about under which conditions, if any, the JIT can perform an optimization or simplification of the compiled IL. To illustrate, consider the following functionally-equivalent representations of an exception handler. // Nested try/catch try { try { ...

Smart JVM and JIT Micro-Optimizations

Over time, Sun's JVM and JIT have gotten pretty smart. Things that used to be common knowledge as being a necessary micro-optimization are no longer needed, because it gets taken care of for you. For example, it used to be the case that you should mark all possible classes as final, so the JVM inlines as much code as possible. However...

Does JIT performance suffer due to writeable pages?

In the book Linkers and Loaders, it's mentioned that one of the reasons for executables to have a separate code section is that the code section can be kept in read only pages, which results in a performance increase. Is this still true for a modern OS? Seeing as Just in Time compilers are generating code on the fly, I assume they need w...

Dynamically Loading Page Class/Assembly: Type or name could not be found in the global namespace

Hi, I am trying to create an ASP.Net Web application that stores it's "content" (ASPX/ASCX and assemblies) somewhere other than the file system (Inside a service, for example) and loads them in dynamically as required. I have successfully created a VirtualPathProvider that takes care of reading ASPX/Master/ASCX files from alternate loc...

Does the .Net CLR JIT compile every method, every time?

I know that Java's HotSpot JIT will sometimes skip JIT compiling a method if it expects the overhead of compilation to be lower than the overhead of running the method in interpreted mode. Does the .Net CLR have work based upon a similar heuristic? ...

Is there any .Net JIT Support from chip vendors?

I know that ARM actually has some support for Java and SUN obviously, but I haven't really references seen any chip vendor supporting a .Net JIT compiler. I know IBM and Intel both support C compilers, as well as TI and many of the embedded chip vendors. When you think of it, all a JIT compiler is, is the last stages of compilation and...

Embedding Mono - Overhead of a native -> managed context switch.

Hi, Anyone got any details on the overhead of a native -> managed context switch in Mono? Namely the overhead caused by calling .NET methods/creating .NET objects using the C API. Thanks. ...

The condition field (ARM ISA) and its applicability to managed code JIT

After working with the ARM instruction set for a bit after heavy X86 work in the past, I'm pondering something for the CIL AOT/JIT compiler I'm working on. My intermediate representation is a fixed-width expansion of the CIL byte code with a couple extra opcodes. Here's an example of a situation that arises in the JIT, and two possible s...

Building v8 without JIT

Hello, I would like to run some tests on v8 with and without JIT to compare performances. I know JIT will improve my average speed performance, but it would be nice for me to have some actual more detailed tests results as I want to work with mobile platforms. I haven't found how to enable or disable JIT like it exists on Squirrelfish ...

How to see native code bytes from .NETCF JIT compiler on

Can anyone suggest a way (supported or unsupported) of getting a look at native code bytes compiled by the NETCF JIT compiler. I happen to be on WinCE6.0 on an ARM platform. I'm guessing that this can be done with a native debugger, but I'm trying to figure out (essentially) how I would get my bearings to know what I'm looking at. Per...

If optimizations are enabled will the JIT always inline this method?

I am not expecting a definite yes or no. Any knowledge you might have I will consider as an answer. private String CalculateCharge(Nullable<Decimal> bill, Nullable<Decimal> rate) { return ((bill ?? 0.0m) * (rate ?? 0.0m)).ToString("C"); } ...

can we implement a java interpreter in hardware that executes Java bytecodes natively?

if we implement java interpreter in hardware then how we can achieve architecture neutrality of java bytecode... does java uses JIT(just in time interpreter) ? and how all this is related to Virtual Machine concept of operating system and java virtual machine(JVM) ...

Compiling code directly into MSIL

Hi Is there a way to complie code directly into MSIL rather than Native Code. so that we can bypass JIT while executing the code on machine. If its possible. Please let me know the technique also. Thanks ...

.NET assembly cache / ngen / jit image warm-up and cool-down behavior

Hi, I have an Input Method (IME) program built with C#.NET 2.0 DLL through C++/CLI. Since an IME is always attaching to another application, the C#.NET DLL seems not able to avoid image address rebasing. Although I have applied ngen to create a native image of that C#.NET 2.0 DLL and installed it into Global Assembly Cache, it didn't i...