Well libunwind is used to implement Python-level exceptions, so I guess it might be easy to disable, but hard to disable without removing support for exceptions
that said, we might have the ability to do that now, now that we have return-code-based exceptions as well. I'm not sure if those are usable everything; I think there are some cases that we require libunwind-based exceptions.
My guess is still that it's easier to fix our usage of libunwind than to replace it
The python bytecode -> machine code isn't a very important step; it's mostly just to enable our inline caches
The bytecode will just tell you something like "fetch the 'foo' member from argument 1 and call it with no arguments"
Decoding that doesn't take very much time; most of the time is spent actually doing the work the bytecodes describe (looking up attributes, doing the descriptor protocol, doing calling-convention matching, etc)
Maybe you could do some type analysis on the bytecode to know what the types are, but without deeper hooks into the runtime, types alone won't specific how to execute bytecodes
But what else is there, you said decoding and doing bytecode operations are a minimal part of the runtime, which makes sense. But isn't the execution of what the bytecode does make up almost entirely the rest of it? Say I had BINARY_ADD with a and b each on the stack. if I did some clever analysis and knew they were both ints, couldn't I speed up that addition?
And thank you very much for discussing this, I have some knowledge of jits and Python internals, but Im always interested in learning more :)
@kmod my question about compiling to a binary was just because I wanted to run it on my raspberry pi and not need an entire jit
and as far as libunwind goes, i think it would be really good to figure out a way to fix it, because as far as i can see, if we don't need libunwind i'm pretty sure i'd be able to get this to work on a mac
this is kind of stupid, but if you know a way to compile to a binary we could go beyond raspberry pi and maybe even run python on ios?
anyway, that's aside the point
i know languages like crystal and rust use the llvm and they are able to compile to native binaries, but from what i can see from pyston it's not exactly simple