Re:What's your C migration plan?
by sbov on Thursday October 13, 2011 @06:38PM
(#3109090)
I've been recently using Python more rather than Java, and I find myself writing C more than ever. I always seem to find some speed/memory issue in my programs that when rewritten in C goes away. Maybe I'm just not proficient enough in Python to avoid them yet. I would say its still a net gain over raw C.
[ Parent
| on HN ]
Is it that easy to write in C and call from Python that you don't think twice about it?
Yes, it actually is. Writing Python extensions in C was always easy, but now there's ctypes, and you don't even need to do that anymore. You can just call a shared library function directly from Python.
Re:What's your C migration plan?
by lucian1900 on Friday October 14, 2011 @07:32AM
(#3110777)
You might want to use a profiler first, then try PyPy. Then Cython.
I didn't mean to imply I didn't profile (otherwise I wouldn't know what parts to write in C). I've been doing profiling (and trying various non-C ideas on what may help first). I'll have to look into PyPy and Cython, thanks.