There's currently no special way, you could bind to it using cffi; but this
will generate a call to a C function, not the instruction directly.
Alex
On Mon, Jul 29, 2013 at 5:15 PM, Nathan Hurst wrote:
> Is there a way to call special operators such as __builtin_popcount
> from within pypy?
>
Is there a way to call special operators such as __builtin_popcount
from within pypy?
regards,
njh
___
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev
I was playing with this simple function to compute uint/3. It does
not (afaict) directly allocate any memory, but when run it rapidly
consumes all memory (32GB):
def divu3(n):
q = (n >> 2) + (n >> 4) # q = n*0.0101 (approx).
q = q + (q >> 4) # q = n*0.01010101.
q = q + (q >> 8) # q
Hi Nathan,
On Mon, Jul 29, 2013 at 1:28 AM, Nathan Hurst wrote:
> why does python and pypy do this? Is it part of the GIL problem?
> will STM fix it?
PyPy does this because Python does it. It is not part of any other
problem, just that thread.join() uses lock.acquire(), which cannot be
interru