On Sun, 2008-04-20 at 14:17 -0400, Nathan Nobbe wrote: > On Sun, Apr 20, 2008 at 6:50 AM, Per Jessen <per@xxxxxxxxxxxx> wrote: > > > Nathan Nobbe wrote: > > > > > umm, so whats going on here is the implicit component of the statement > > > that incorporates relative or absolute performance. in terms of > > > relative performance the statement is accurate; in terms of absolute > > > performance, its quite inaccurate. > > > > > > > Nathan, I think we're disagreeing about the meaning of "algorithm" - an > > algorithm does not have an absolute performance until it's been > > implemented - in some of other language and machine. > > > > i thought about that too.. i looked it up on wikipedia before i posted just > to be sure of myself. the way i view it, there are 2 things an algorithm > could mean. there are for instance well known algorithms like bubble sort > or quick sort, but basically any function written in any language is an > algorithm. and wikipedia agrees w/ that statement. "Algorithm" is just a fancy word for recipe. In fact, you should ask a someone sometime what algorithm they're using to bake a cake ;) > but either way i dont see why it matters, if you implement an algorithm > (according to you) in c or php then at that point it will have an absolute > performance. and the likelihood its faster in c, absolutely, is very very > high :) If something written in C is slower than something in PHP, or slower even than something written in C++, then it's a problem with the implementation, not the language. The best C++ can do is match the speed of C. C++ has overhead, that overhead can't be squashed to be more efficient than C, it can only be removed when not necessary. Unless of course, for some odd, odd, odd reason, an optimization for C++ compiled code was not also added to C. Since any optimization that can make C++ faster can also make C faster where appropriate. The same is true of memory consumption in C++ versus C. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php