[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dylan and OpenGL?





Bruce Hoult wrote:
> 
> What are the limitations in C++ that are bugging you?

One of them is the amount of compiling that has to be done when a file
just makes reference to a type which in turn uses huge libraries like
Carbon. Then a class with a hundred lines of code is as slow to compile
as a major class. It would be nice if the class interfaces were a little
less dependent on indirect types, eg. [private] members of other classes.

> > Basically, I would like to know if it is performance wise possible to
> > achieve cpp levels
> 
> Yes.
> 
> It can take some work, adding declarations and "sealing" to the critical
> parts of your program, but you can come to +/- the same speed as C++.
> 
> The good news is that you don't need to over-specify the *rest* of your
> program.
> 
> The main things that currently make Gwydion Dylan a little slower than
> C/C++:
> 
> - objects larger than 4 bytes are always allocated on the heap.  This
> can be a problem if you're allocating and deallocating in a tight loop
> and C++ is using stack-based objects.
> 
> - Dylan always checks array bounds.  Actual compilers have a way to
> escape this if you really need to, of course.
> 
> - Dylan's equivalent to virtual functions is more general and therefore
> slower.  However, the difference can usually be made small in cases you
> care about.

I dont actually care about stack objects, as I try to pre-allocate
memory as much as possible, and generally do not use recursive functions
of unlimited depth, except for maybe string parsing.

The virtual function thing in C++ was more bugging me than it helped.

> As an example of fast code from Dylan look at the ICFP Programming
> Contest (http://cristal.inria.fr/ICFP2001/prog-contest).
> 
> > and if there are no technical hindrances. I would
> > like to make my program cross-platform, but am developing on OS 9 with
> > CW 6 at the time. I am talking about putting about 100k-1000k triangles
> > or more on the screen per second on current hardware. That is pretty
> > much what my cpp code can do, even though it doesnt do much right now.
> 
> You're almost certainly being limited by OpenGL itself.

I am thinking I want the same performance for doing the same work as my
program does right now. Since OpenGL function accessses make up a large
amount of my current code, it is significant that performance in
accessing it is very good.


> On OS 9 (and OS X) you're limited to the Open Source "Gwydion Dylan"
> (http://www.gwydiondylan.org).
> 
> Gwydion is primarily a Unix compiler and runs natively on OS X.
> However, Gabor Greif maintains a version implemented as a CodeWarrior
> plug-in compiler.
> 
> Gwydion Dylan comes with an OpenGL example.  I don't know if this works
> on OS 9.

It's ok. Got me OS X. Still, I am much dependent on OS 9, still, and
there is no end in sight. I am currently rebooting at least 4 times a
day to switch OS's. And booting into 9 now takes much longer
somehow...bla blabla...[insert own painful experience here].

>   http://berlin.ccc.de/cgi-bin/cvsweb/gd/examples/gdgl
> 
> -- Bruce

I will most certainly look further into it.

 - D.G

----
A-10 Project
http://geocities.com/powersof2000/main/main.html