No subject
Fri Jul 1 10:25:02 EDT 2005
#! rnews 1689
Newsgroups: comp.lang.python
Path: news.xs4all.nl!newsspool.news.xs4all.nl!transit.news.xs4all.nl!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!attws2!ip.att.net!NetNews1!xyzzy!nntp
From: Harry George <harry.g.george at boeing.com>
Subject: Re: Python for everything?
X-Nntp-Posting-Host: cola2.ca.boeing.com
Content-Type: text/plain; charset=us-ascii
Message-ID: <xqx8y0qehvz.fsf at cola2.ca.boeing.com>
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4
Lines: 29
Sender: hgg9140 at cola2.ca.boeing.com
Organization: The Boeing Company
References: <1120164834.057669.297840 at f14g2000cwb.googlegroups.com> <Pine.LNX.4.62.0507011320460.24395 at urchin.earth.li>
Mime-Version: 1.0
Date: Fri, 1 Jul 2005 14:10:56 GMT
Xref: news.xs4all.nl comp.lang.python:384366
Tom Anderson <twic at urchin.earth.li> writes:
> On Thu, 30 Jun 2005 xeys_00 at yahoo.com wrote:
>
> > can Python "do it all"?
>
[snip]
> The other is in bit-twiddling - anything that involves
> mucking about with data at the level of bits and bytes. Maybe this is
> just blind prejudice, but i'm never as comfortable hacking on that
> sort of stuff (writing a Huffman coder, say) in python as in java.
Maybe we should distinguish:
1. Can you do it at all? Yes, via the struct package and via the bit
operators. And, the bit operators support the same idioms we all
know and love from C.
2. Can it be done "fast enough"? Maybe. I wrote a Morse code
generator based on algorithms from a C program, which generated pcm
files. The initial cut was way too slow. Then I did some caching
and got it fast enough to use. Still not C speeds, but fast enough
for the task. But if you are doing encryptions (where even C is
giving way to hardware), then Python is not the answer.
--
harry.g.george at boeing.com
6-6M21 BCA CompArch Design Engineering
Phone: (425) 294-4718
More information about the Python-list
mailing list