#! 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 <[EMAIL PROTECTED]>
Subject: Re: Python for everything?
X-Nntp-Posting-Host: cola2.ca.boeing.com
Content-Type: text/plain; charset=us-ascii
Message-ID: <[EMAIL PROTECTED]>
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4
Lines: 29
Sender: [EMAIL PROTECTED]
Organization: The Boeing Company
References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
Mime-Version: 1.0
Date: Fri, 1 Jul 2005 14:10:56 GMT
Xref: news.xs4all.nl comp.lang.python:384366

Tom Anderson <[EMAIL PROTECTED]> writes:

> On Thu, 30 Jun 2005 [EMAIL PROTECTED] 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.

-- 
[EMAIL PROTECTED]
6-6M21 BCA CompArch Design Engineering
Phone: (425) 294-4718
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to