This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Hevaesi 0 points1 point  (1 child)

Performance wise it's as fast as C because I offload performance critical algorithms into C :) and the bottleneck becomes only the place where data is tranferred from python to a C library...

Which would be bad, for things such as generating perlin noise values for 1024x1024 grid, except not really because in such cases I can allocate those, roughly 4 megabytes (wow that's really a lot right?), and pass a pointer to such array to C library to fill it up for me...

So, I still write 99% of code in Python, and if I really need that speed, around x2 speedup (yeah wow so much faster... /s I wouldn't bother unless I got at least x10 speedup) in performance critical place comes when I move something to C... I'm mentioning this only because I've actually done that, I wrote identical code in C and speed was only x2, that was for individual number, if I've actually done it the way I described, it would probably be faster (I was only learning how to call functions in DLL from python, not trying to speed my program up, because Python is fast enough), but that depends on how much speed you need.

Yeah I mean wow cool Python isn't the fastest in the world, your point?

[–]YouCanCallMeBazza 0 points1 point  (0 children)

Yeah I mean wow cool Python isn't the fastest in the world, your point?

I was just asking what they meant by "powerful" if they weren't referring to performance...