[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: C++ (was Re: interesting links)
On 8/30/07, Dave McGuire <mcguire@xxxxxxxxxxxxx> wrote:
> On Aug 30, 2007, at 9:26 PM, Timothy Normand Miller wrote:
> > I'm no longer obsessed with maximizing performance of the machine.
> > Now, I want to maximize my performance as a programmer.
>
> Be very, very careful with that attitude. Back in the 1970s, some
> blithering idiot came up with the idea that programmer time is more
> important than processor time. This has given rise to things like
> Windows, which takes hundreds of megabytes of RAM and multi-GHz
> processors to do even the very simplest of things. That moron back
> in the 1970s (whoever it was) should be put up against a wall and shot.
Well, don't misinterpret me. I still like to write tight, efficient
code. And in fact, Ruby makes that easier, I believe. If you were to
rewrite that same code in C++, it would be faster and not require the
Ruby runtime environment. But it would take a heck of a lot longer to
code and be much more difficult to modify. (Or course, if everything
were writtn in Ruby, the VM memory overhead would amortize out.)
I took a computational linguistics class last Spring quarter, and I
decided to do the class project (an Earley parser) in Ruby. A direct
port of the Java program to Ruby was remarkably slower. However a bit
of profiling and some other clever optimizations later (not all
mine--another student was using Ruby too and shared some ideas), and I
was beating the best time of any Java program by an order of
magnitude. Ok, so sure, I spent extra time working on it, but that's
okay, because it was FUN. :)
The lesson: Profilers are your friends.
--
Timothy Normand Miller
http://www.cse.ohio-state.edu/~millerti
Open Graphics Project
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user