Quantcast
Channel: Planet Plone - Where Developers And Integrators Write
Viewing all articles
Browse latest Browse all 3535

Tim Knapp: Python is slow, make it faster with C - Ben Shaw

$
0
0

C Module - traditional way. Write your functions in C (usually just wrapper code).

CTypes - newer way since 2006. Integration a bit more difficult. Great to use if don’t need Python types, exceptions, & objects back.

CDLL: reference to DLL

Init module that sets up the module.

Pypy: libraries written in C may not work. No need to change Python code.

Pure C: 11.2x faster, Pypy: 5.7x faster.

Slides: http://bbit.co.nz/blog/4/


Viewing all articles
Browse latest Browse all 3535

Trending Articles