float / double support in Python?

Brandon Van Every vanevery at 3DProgrammer.com
Fri Feb 7 05:27:30 EST 2003


Mike C. Fletcher wrote:
> However, the Numeric Python extensions
> provide _multi-dimensional_ arrays of various data-types, so you can
> easily represent arrays of vectors efficiently.

So you're saying the Python overhead occurs only once per array?

> What Python is going to be slow on is your classic low-level 3D
> operations (e.g. tessellation, generating sub-division-surface levels,
> representing individual polygons/vertices).

Which is exactly the kind of job I'm more likely to prefer Python for.  If I
know how to bake things into an array, what do I need a flexible language
for?  Well, maybe there's something, but I do see a design tendency here.

> BTW, another area where Python trails C/C++ is access to
> parallelisation mechanisms.  AFAIK there's nothing in Numeric Python
> that takes
> advantage of SIMD, so even on large matrices (where Python is normally
> OK) you could find a significant advantage for C/C++ coded nodes which
> use SIMD instructions.

Hrm.  Again, if I can make it into an array, I'm probably going to want to
move on to C++.  Well, I suppose there's a prototyping path here:

    Python Junk --> Python Numarray --> C++ array --> ASM SIMD array

I don't see merit in always starting from Python.  If I understand and can
predict the stability of the design, I'd skip straight to C++.

> Why does this thread have such a weird vibe?  I do a heck of a lot of
> 3D programming in Python, and love to talk about it, but I've been
> avoiding the thread 'cause it seems so... confrontational.

It's confrontational because I got tired of hearing from people that I'm
some boob for not bowing down to Almighty Python despite my 11 years of C++
and 3D graphics experience.  I try to tell people there are problem domains
other than what they're thinking of, and that it's possible to KISS in C++.
Do they listen?  Nooooo, it's "you haven't done Python this, you're a troll
that, you obviously whatever!"  Yadda yadda muck muck muck.  I'm just glad
that by finally focusing the questions on the specific problem domains I
care about, I'm getting the right answers.  You're a great help, Mike.

And, I want to throw Outlook Express out the window.  It crashes so often!
Tried Forte Agent, but it doesn't have a "view replies to my posts"
function, which is the single most useful filter possible.  Anyone know if
I've just missed something?  Also I far prefer Outlook Express's bold text /
normal text paradigm for unread / read.

--
Cheers,                         www.3DProgrammer.com
Brandon Van Every               Seattle, WA

20% of the world is real.
80% is gobbledygook we make up inside our own heads.





More information about the Python-list mailing list