473,574 Members | 2,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Speed abilities

Ive read a few comments, the usual about it being slower,sometime s 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 988
"Coyoteboy" <co*********@ho tmail.com> writes:
Ive read a few comments, the usual about it being slower,sometime s 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
23032
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
2449
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, callable(*args)) return proxy which, is functionally equivalent to
6
1975
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 that are simple, yet will tax the processor and the abilities of the languages? Thanks =)
5
254
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 technologies. I use codebehinds as standard Does anyone else find that developing with ASP.net takes more work than asp.
6
7049
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 advance.
13
2481
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 experience. We employ some parts of XP such as pair programming, and this should help. Other than books, does anyone have any suggestions? His skill set is...
18
1897
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% according to one IT guy!!). I'm looking into converting the MDB app into an ADP with a SQL Server backend. To justify the costs involved, I'm...
4
8601
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 speed), ALWAYS. However, my download speed doesn't go over 25MB/s. And when my brother turns on the internet from his computer and takes up half the...
0
7715
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7806
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8093
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6440
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5611
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3739
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3748
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1053
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.