Pizza Making Forum
March 20, 2010, 12:48:08 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Total time logged in: 0 minutes.
 
   Home   Help Search Calendar Login Register  
Pages: 1 [2]   Go Down
  Print  
Author Topic: Logic Test  (Read 2197 times)
0 Members and 1 Guest are viewing this topic.
perna
Registered User

Offline Offline

Posts: 22


« Reply #20 on: May 16, 2009, 11:09:58 AM »

If you cut it with a chainsaw you would have millions of pieces. Evil
Logged
abatardi
Registered User

Offline Offline

Posts: 433


It's MOOPS!


« Reply #21 on: May 16, 2009, 11:28:32 AM »

Precisely as it should.  You don't write functions with arguments and then only pass them the same values.  Optimization for low range inputs does not make for a very good function.  That's why I was testing in a larger range.  To make matters worse, in my configuration and using 7 cuts in a 100k loop, I get a 10.5x performance decrease with yours.  But my box is probably configured for different things than yours.  We probably ought to take this to personal messages though since this is beyond what the average pizza maker wants to see.

The argument is by reference and therefore used to eliminate a return statement

I think the box I am testing on is just more powerful or configured better (this is highly optimized php for a production setup).

Either way, this little function is the least of things I have to worry about today, haha, so I have to get going.  Talk to you later.

- aba
« Last Edit: May 16, 2009, 11:37:42 AM by abatardi » Logged

Make me a bicycle CLOWN!
abatardi
Registered User

Offline Offline

Posts: 433


It's MOOPS!


« Reply #22 on: May 16, 2009, 11:36:15 AM »

Efficiency and PHP - do these really belong together?

Ah, it all makes sense now -- you are one of those guys.  Tell this to Yahoo and countless others relying on PHP in production and writing highly effiicient code to save millions in hardware costs.

Per your statement of getting it done faster in C... I challenge you to write this program in C, compile it and get a result faster than I can do the same in PHP or perl.  :-)

What application developers seem to glaringly miss is exactly what you made obvious in your first statement and what November is trying to get through to you -- that efficiency is of no concern to you.  This is why desktop apps are notoriously known for memory leaks, being cpu hogs, bloatware, slow, you name it... and why the web application developer has to write the most efficient code possible.  If they don't, the person simply leaves the site and goes elsewhere... if the desktop app is slow, how many are really going to uninstall it and find an alternate solution rather than just scream at their system and curse the idiot developer for bogging down their system?
Logged

Make me a bicycle CLOWN!
pizzapro
Registered User

Offline Offline

Posts: 6


« Reply #23 on: May 16, 2009, 02:04:29 PM »

November, are you that kid who always feels compelled to shout everyone else down to show your smarts? You're challenging proofs that don't exist, arguing about counting pieces when there are no cuts made, and determined to have some big pissing contest over "efficiency" when the actual problem only involves adding seven numbers? This puzzle was meant to be fun.

Per your statement of getting it done faster in C... I challenge you to write this program in C, compile it and get a result faster than I can do the same in PHP or perl.  :-)
Quite right, an interpreted language is the way to go here since execution times aren't very important (yes - as with MOST programming tasks in the world). As an aside, so you don't think I'm picking on PHP, I'll confess that my weapon of choice for most things is ruby, not because it's the least bit efficient or speedy, but because I'm so slow at coding in C.

And yes the programmer's efficiency is usually more important than the efficiency of the code - otherwise you're stuck with a philosophy that has you tweaking every code library you use, re-inventing every wheel. BTW, Yahoo is NOT getting efficient code. They don't care - they do it to make efficient use of programming resources.
Logged
Bill/SFNM
Supporting Member
Global Moderator
*****
Offline Offline

Posts: 1922



WWW
« Reply #24 on: May 16, 2009, 02:24:22 PM »

Please take this discussion off-list.
Logged

Extreme Cooking - My Food Blog
Pizza is 84% immutable laws of science and 26% magic
JConk007
Registered User

Offline Offline

Posts: 1129


Lovin my Oven!


« Reply #25 on: May 16, 2009, 09:42:10 PM »

Well I too had no intention of arguing about formulas or going after Novembers normal responses. Who gives a crap. You can remove  the whole thread  and lets be freinds. I was hoping to for a little mind (normal) tickler thats all. It was just meant to be a fun quick thinking question ( that I could not figure out Huh???) I wonder if Einstein would have responded in the silly belittling way. 
Lets go back to the science of pizza.
Thanks all. And I'll stick to pizza posting.
John
« Last Edit: May 16, 2009, 09:47:18 PM by JConk007 » Logged

I Just Love the Flame, The Fire, and the Fabulous Finished Product, that Frequently Flows, From thy Dome of Furious and Fragrant heat !
Pages: 1 [2]   Go Up
  Print  
 
Jump to:  

Powered by SMF 1.1.1 | SMF © 2006, Simple Machines LLC


Google visited last this page March 13, 2010, 10:17:47 AM