New submission from Tom Cornebize:

It is much faster to construct a Python array from the list and then cast this 
array, rather than using the "standard" constructor. See attached file to 
compare the performances.

This issue was previously asked on Stackoverflow: 
http://stackoverflow.com/questions/39225263/why-is-ctypes-so-slow-to-convert-a-python-list-to-a-c-array/

----------
components: ctypes
files: ctypes_slow.py
messages: 274111
nosy: Tom Cornebize
priority: normal
severity: normal
status: open
title: ctypes is too slow to convert a Python list to a C array
type: performance
Added file: http://bugs.python.org/file44320/ctypes_slow.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27926>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to