473,385 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Speed abilities

Ive read a few comments, the usual about it being slower,sometimes vastly
slower than a C++ written item but I was wondering if its 'slow'
incomparison with what I need. I'm looking at taking two arrays of 12 bytes
over an ethernet connection, comparing them, recieving correction data
(single byte) from another module over a pipe at approximately 900Hz and
using all these with a fairly complex set of algorithms to generate a new
set of 12 byte data. This has to be done in a very short time, preferably
the same rate of throughput as the 900Hz. Am i asking too much of Python? I
find C++/MFC fairly complex and python looked like a great alternative if it
hadnt been 'flagged' as slow.

Cheers
J
Apr 18 '06 #1
1 979
"Coyoteboy" <co*********@hotmail.com> writes:
Ive read a few comments, the usual about it being slower,sometimes vastly
slower than a C++ written item but I was wondering if its 'slow'
incomparison with what I need. I'm looking at taking two arrays of 12 bytes
over an ethernet connection, comparing them, recieving correction data
(single byte) from another module over a pipe at approximately 900Hz and
using all these with a fairly complex set of algorithms to generate a new
set of 12 byte data. This has to be done in a very short time, preferably
the same rate of throughput as the 900Hz. Am i asking too much of Python? I
find C++/MFC fairly complex and python looked like a great alternative if it
hadnt been 'flagged' as slow.

Cheers
J


There is no way to tell from this info. This is a real-time problem.

If you assume 1GHZ CPU, 10 clks/instruction, 10000 instructions/event
then you require 0.001 sec/event. 900Hz event rate means you only
have 0.0011 sec/event available, which is the same order of magnitude.
Chances are, variation in the event rate or in the OS response time
would violate this small safety factor, even if the assumptions were
dead on.

So you need a faster machine or fewer instructions. Some instructions
will be used in the OS and interface stack, no matter what language
you use. Some will be used in your "fairly complex set of
algorithms". You may have used up your 10000 instructions without
getting around to Python. Even assembler might be too slow.

If you did implement in Python and found it was too slow by a moderate
factor (e.g., you could only handle 500Hz event rate), then you can
stay in python to explore alternative implementations. E.g., multiple
processors in parallel, more efficient algorithms, ctypes or pyrex to
speed up the python.

In terms of the overall project notion-to-delivery duration,
implementing in Python might be the right first step on your way to an
assembler implementation.
--
Harry George
PLM Engineering Architecture
Apr 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Yang Li Ke | last post by:
Hi guys, Is it possible to know the internet speed of the visitors with php? Thanx -- Yang
34
by: Jacek Generowicz | last post by:
I have a program in which I make very good use of a memoizer: def memoize(callable): cache = {} def proxy(*args): try: return cache except KeyError: return cache.setdefault(args,...
6
by: trentdk | last post by:
I want to test which language (testing C and FORTRAN) would be faster with math calculations; one test with intergers, and another test with floats. What math formulas/functions would you guys use...
5
by: Simon Harvey | last post by:
Hi All, I have a colleague that I wprk with that develops using ASP. I develop using ASP.net. He seems to make sites much faster than me and I am wondering if its because of the two different...
6
by: MSDousti | last post by:
Hi all. How can I detect CPU speed (in MHz) with .NET (VB or C#)? There are some DLLs or registry tricks, but is there a way detecting it using dotNet's abilities or windows API? thnx in...
13
by: BK | last post by:
Our .Net team has just inherited a junior programmer that we need to get up to speed as quickly as possible. Unfortunately, his skill set is largely Access with some VB6 and ASP classic...
18
by: maxhugen | last post by:
I have an Access app (split into FE and BE) running for some years, that is now also being used in a second office, connected by a WAN. This office has network problems, as it's over-utilized (97%...
4
by: nestle | last post by:
I have DSL with a download speed of 32MB/s and an upload speed of 8MB/s(according to my ISP), and I am using a router. My upload speed is always between 8MB/s and 9MB/s(which is above the max upload...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.