[pypy-issue] [issue1624] ffi.new(...) with array whose elements are not long sized is slow

Alex Gaynor tracker at bugs.pypy.org
Tue Oct 22 20:42:48 CEST 2013


New submission from Alex Gaynor <alex.gaynor at gmail.com>:

This is because the fast path only works when `self.citem.is_long()`, we should 
have another fast path which works with integers of any size so, e.g. 
ffi.new("short[]", [...])` is also fast (it won't be as fast because of bounds 
checking, but shoudl be much faster). Right now it does space.listview(w_list) 
which results in allocating a new list and allocating each of the W_IntObjects

----------
messages: 6279
nosy: agaynor, pypy-issue
priority: performance bug
status: unread
title: ffi.new(...) with array whose elements are not long sized is slow

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1624>
________________________________________


More information about the pypy-issue mailing list