BitFunnel / NativeJIT

A C++ expression -> x64 JIT
http://bitfunnel.org/
MIT License
1.14k stars 85 forks source link

Division Node is missing #73

Open christoph-hart opened 7 years ago

christoph-hart commented 7 years ago

I realized there is no node for division. Is there a reason for this (I am wondering because it's such a basic operation).

MikeHopcroft commented 7 years ago

Let me investigate the reason for this. If I recall correctly, the integer divide instruction had some requirements for input/output registers that were harder to satisfy. I believe the node can be added, but that we just did all of the binary operators that didn't have the register restriction. I will see how much work it would be to implement this.

As a workaround, you can call a C-function that either computes 1/x or x/y.

ConsoleTVs commented 6 years ago

Still wondering the same :)

mackrol commented 6 years ago

Any progress in division?

MikeHopcroft commented 6 years ago

A the moment, this work is prioritized lower than work we're doing in the BitFunnel repo. Could you give us an idea of how important this work is to your use case, as this might boost the priority for divide?

mackrol commented 6 years ago

I use div function for now but that's suboptimal in terms of register allocation. I'm just curious / worried whether the project is alive.

josephjaspers commented 6 years ago

I am also requesting support for a division node. Thanks for your work so far though!