[Twisted-Python] Is Twisted adequate for usage in reactive robots?
glyph at divmod.com
glyph at divmod.com
Tue Aug 15 08:57:09 EDT 2006
On Tue, 15 Aug 2006 10:52:53 +0200, Willi Richert <w.richert at gmx.net> wrote:
>The main loop of the Python process would have to run at 50Hz. Longer taking
>calculation process are processed in a separate thread. Is there any
>comparison regarding asynchronous and thread execution/latency/... speeds?
In a nutshell, "asynchronous is faster", but that's not the whole story. ;-).
You're not just changing from an asynchronous framework to a threaded one; you're changing all your code (you are considering rewriting a bunch of existing Java code in Python), your language (Python's semantics are less efficiency-oriented than Java), your runtime (the Python VM is slow) and presumably some other things too. Nothing can substitute for some good old-fashioned benchmarking for your particular application.
However, 50Hz is not very fast. On "reasonable" hardware and with a "reasonable" application, (where "reasonable" is somewhat circularly defined here), Twisted should be able to do that without a hiccup.
More information about the Twisted-Python
mailing list