Been doing a lot of coding in python lately. While some of the hackability of the language is nice for doing some cool things, overall, I cant say im a fan. Its a little too obscured for writing algorithms where effiency is important. Its hard to tell what data types are truly backing various variables and thus makes it tricky to pick the right implementation. I think im working with raw arrays and they turn out to be linked lists or worse. Even then things like a "Dict" isnt always clear if its a Tree implementation or a hashmap implementation or something else entirely.

Granted this isnt an impossible task, I have managed to figure it out by pulling open the source code of the libraries I call and using profiling tools. But python seems to not care or obscures a lot of that.

@freemo
Python is one of the very slowest languages. It's designed to be readible and very high level at a great cost of speed.

Good python code (Pythonic code) is unique and has good use of its primitives (see the Python data model and the standard library).

If course, there's always a best and worst tool for a job.

Follow

@torresjrjr I'm not convinced the language is just inherently slow.. It probably can be written to be fast. It is more that its design and the way people write for python inherently leads to slow code.

So it seems things built on python are, inherently slow, but not due to any absolute limit in core python itself. Afterall you could always just write python to wrap C and it seems thats what libraries tend to do to avoid all the slowness of things written in python that obscured the internals.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.