jit

C# delegate compiler optimisation

I have started to use anonymous delegates a lot in C# and I have begun to wonder how efficient the complier or runtime is in removing them from the code that is actually run and I haven't seen this detailed anywhere? Is it clever enough at all to inline them and collapse recursive uses that could be statically deduced? ...

LLVM: Passing a pointer to a struct, which holds a pointer to a function, to a JIT function

I have an LLVM (version 2.7) module with a function that takes a pointer to a struct. That struct contains a function pointer to a C++ function. The module function is going to be JIT-compiled, and I need to build that struct in C++ using the LLVM API. I can't seem get the pointer to the function as an LLVM value, let alone pass a pointe...

Javascript InfoVis Toolkit: How to specify source/sink for arcs?

I'm using JIT to render graphs. I'm using the RGraph feature. This JSON defines a graph: var json = [ { 'id': '1', 'name': 'CS 2110', 'adjacencies': ['0', '2'] }, { 'id': '1.5', 'name': 'INFO 2300', 'adjacencies': ['1'] }, { 'id': '0', 'name': 'CS 1...

v8 is too slow for my purpose

I'm working on a music visualization plugin for libvisual. It's an AVS clone -- AVS being from Winamp. Right now I have a superscope plugin. This element has 4 scripts, and "point" is run at every pixel. You can imagine that it has to be rather fast. The original libvisual avs clone had a JIT compiler that was really fast, but it had som...

[ebp + 6] instead of +8 in a JIT compiler

I'm implementing a simplistic JIT compiler in a VM I'm writing for fun (mostly to learn more about language design) and I'm getting some weird behavior, maybe someone can tell me why. First I define a JIT "prototype" both for C and C++: #ifdef __cplusplus typedef void* (*_JIT_METHOD) (...); #else typedef (*_JIT_METHOD) (); #en...

How "duplicated" Java code is optimized by the JVM JIT compiler?

I'm in charge of maintaining a JSP based application, running on IBM WebSphere 6.1 (IBM J9 JVM). All JSP pages have a static include reference and in this include file there is some static Java methods declared. They are included in all JSP pages to offer an "easy access" to those utility static methods. I know that this is a very bad wa...

.NET : How to use JIT compiler

I would like to use directly the .NET JIT Compiler, is it possible ? I mean, I would like to do a thing like : ?> jit.exe myfile.msil myfile.exe Or in a c# code ? ...

Overhead (speed & garbage) of calling functions that do nothing.

I am trying to reduce the performance/garbage collection costs of logging statements. I want to have lots of logging statements that I could enable for debugging, but also have a way to turn them off for fast production. I ran a benchmark on calling the following methods: public static final isLogging = false; public static logObjs(O...

JIT complier and execution

I'm confused with JIT compiler, What is JIT compiler? JIT compiler compiles byte codes before each execution or each time JVM loads? ...

Can I bind an existing method to a LLVM Function* and use it from jitted code?

Hey guys, I'm toying around with the LLVM C++ API. I'd like to JIT compile code and run it. However, I need to call a C++ method from said jitted code. Normally, LLVM treats method calls as function calls with the object pointer passed as the first argument, so calling shouldn't be a problem. The real problem is to get that function in...

reason for methods not being compiled in Hotspot JVM

There are flags available that provide log information on methods that have been compiled. Where is the information on methods that didn't get compiled and why they didn't get compiled? Being able to see how the hotspot compiler makes its decisions and the reasons for it not compiling certain methods would give me a better understandin...

Would it be possible for a JIT compiler to utilize GPU for certain operations behind the scenes?

Feel free to correct me if any part of my understanding is wrong. My understanding is that GPUs offer a subset of the instructions that a normal CPU provides but executes them much faster. I know there are ways to utilize GPU cycles for non-graphical purpose, but it seems like (in theory) a language that's Just In Time compiled could d...

Dalvik JIT compiler on Linux X86 or Mac build

Hello, As I've heard from Google IO 2010 session, Dalvik JIT compiler just support ARM processor. Do this mean my own build of Android source on Linux X86 or Mac OS X can not support JIT compiler? Should I use some target board with ARM processor to test Dalvik JIT compiler? Thanks! ...

Does the .NET garbage collector perform predictive analysis of code ?

OK, I realize that question might seem weird, but I just noticed something that really puzzled me... Have a look at this code : static void TestGC() { object o1 = new Object(); object o2 = new Object(); WeakReference w1 = new WeakReference(o1); WeakReference w2 = new WeakReference(o2); GC.Collect...

JITs fundamentals

I understand somewhat how "int a = b+abs(c)" can be translated to simple assembly instructions and then translate that to some binary blob. But how can this be run and be interacted with dynamically in memory? -- edit -- I know C doesn't have an eval feature. But what it's compiled to does. I mean this is what makes Java like JITs, and...

Does a JIT compiler have any disadvantages compared to a traditional compiler?

Possible Duplicate: JIT compiler vs offline compilers So until a few minutes ago I didn't really understand what the difference between a JIT compiler and an interpreter is. Browsing through SO, I found the answer, which brought up the question in the title. As far as I've found, JIT compilers have the benefit of being able to...

Any tutorial for embedding Clang as script interpreter into C++ Code?

I have no experience with llvm or clang, yet. From what I read clang is said to be easily embeddable Wikipedia-Clang, however, I did not find any tutorials about how to achieve this. So is it possible to provide the user of a c++ application with scripting-powers by JIT compiling and executing user-defined code at runtime? Would it be po...

Questions about possible java(or other memory managed language) optimizations

From what I have read java (usually) seems to compile java to not very (is at all?) optimised java bytecode, leaving it to the jit to optimise. Is this true? And if it is has there been any exploration (possibly in alternative implementations) of getting the compiler to optimise the code so the jit has less work to do (is this possible)?...

compiler design for direct execution

Do you know good compiler designs when the output should be located into the process memory and executed immediately after compiling? I've looked into few SCHEME compilers and read whatever I could about V8. There's interesting JIT techniques like inline caching I would like to try in my own compiler. It's all right to answer with almo...

JIT of R code using Ra

I just discovered Ra from Ubuntu repositories. Has anyone used it in actual projects? Have you encountered any problems and are there any trade offs with using Ra instead of R or JIT in general? ...