Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About JIT in Windows Phone
02-17-2016, 11:03 PM
Post: #1
About JIT in Windows Phone
I'd like to hear people's experiences and opinions on the performance benefits of threaded interpreters vs traditional interpreters vs dynamic binary translation/JIT. For those who are not aware of what threaded interpreters are I shall provide a brief description:

As each instruction is fetched and decoded by the standard interpreter a function pointer to the final native code is added to an array indexed by the program counter. Each time an instruction is fetched the function pointer array is read to see if there is a valid function pointer. If so the code is called using the function pointer and the instruction executed while bypassing the decode. The aim being to create threaded code (i.e. a contiguous sequence of unconditional subroutine calls) which will execute much faster than the sequence of conditional calls/branches which make up an interpreter's decode. On the other hand there is still some overhead in calling and returning when compared to the use of cached basic blocks in dynamic binary translation.

Why would I be interested in using this method? As it happens platform X prevents execution of data by application code, meaning dynamic binary translation cannot be used under any circumstances. It is however permissible to call static code using function pointers. It is widely agreed to be impractical to emulate target Y on platform X using a basic linear interpretation. A proof of concept of threaded interpretation to emulate targets similar in complexity/speed to target Y has been published but has suffered from neglect due to IRL issues facing the lone developer. Other developers continue to disparage platform X as "useless" for emulation purposes due to the inability to use dynarec.

My question therefore is; how widespread is use/knowledge of threaded interpretation techniques in emulation? Or is there a legitimate reason behind developers apparent ignorance of this method of optimization?

The text is not mine, but I found it very interesting about resorting to JIT missing on Windows Phone
Find all posts by this user
Quote this message in a reply
02-18-2016, 07:27 AM
Post: #2
RE: About JIT in Windows Phone
Threaded interpreters can only reach maybe 1/10th of the speed of a good JIT (of course depending on target and host CPU archs, etc). So they are not very interesting for high performance emulators - although yeah, can be interesting sometimes when JIT is not possible.
Find all posts by this user
Quote this message in a reply
02-19-2016, 10:32 PM (This post was last modified: 05-08-2016 02:12 PM by Ezequiel Gomes.)
Post: #3
RE: About JIT in Windows Phone
Disarm
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: