17 ms·
It's probably a stupid question, but: what's the advantage to coding everything in Python? If you're targeting the N900, Psyco likely won't help you, and there'
by sqrt17 16y ago
It's probably a stupid question, but: what's the advantage to coding everything in Python? If you're targeting the N900, Psyco likely won't help you, and there's probably some existing MP3 library that one can wrap (libmpg123)?
Also: you might want to try Cython, it compiles a Python-like language to (reasonably platform-independent) C or C++ code, with very good Python interoperability.
- masklinn 16y agoYou'd have known if you had but simply scrolled to the introductory post: > I’m going to write a python based MP3 decoder. Yeah, its a bad idea from a performance standpoint, but from a learning/documenting perspective, it is quick and easy.
- sqrt17 16y agoOk. But then I don't understand the squirmyness about using numpy (and possibly scipy). Not using numpy in such cases will always give you less-than-decent performance.
- masklinn 16y agoThat it will very likely make code less clear and readable, though it would probably be a necessary step to reaching realtime performance on his decoder.
- extension 16y agoIf I had to implement something as sophisticated and novel (to me) as an mp3 decoder, I would first prototype it in my favorite dynamic language and then port it to something fast.
- acdha 16y agoIt's great for learning and playing with algorithms, particularly since you would save so much time which would otherwise be consumed with low-level details that you'd have a much better understanding of the overall program function when the time came to optimize. There's a real forest-for-the-trees problem optimizing something like C first.