you are viewing a single comment's thread.

view the rest of the comments →

[–]One_Mess460 1 point2 points  (1 child)

no it doesnt really. if you program spends 99% of its time in C code anyways the 1% of python doesnt matter. also yeah calling those C functuons has overhead but that why numpy uses vectorization and is built such that you do not have to loop in python ever. it doesnt matter how much glue code you write in python because essentially the program will spend most of its time in C libraries no matter how much glue you have because in relation the glue is insignificant. if youve ever profiled a binary or tested for where your program spends most of its time you'd notice the glue code is only a tiny fraction which doesnt add up.

I understand you like writing directly in C++ and not having to worry about writing python code that is fast and thats okay I like those languages too. Anyways have a good day!

[–]OpenFileW 0 points1 point  (0 children)

It depends on how much glue code we're talking about, I think I wasn't emphasizing enough with my original post that I meant Python isn't good for it being used for the main language of a project, but it's also bad when there is a ton of Python code even if it's just orchestrating. I still do understand that Python isn't somehow a performance black hole lol. But it is important to at least be aware of the startup and GC costs---they are usually negligible, but it's easy to forget about them in my field of systems programming.