Schlemiel the Painter's algorithm: Difference between revisions

Content deleted Content added
Wookie2u (talk | contribs)
Supplied a "stub" article for Schlemiel the painters algorithm... which is (IMHO) one of the fifty-five million things that every software engineer should be on the lookout for, no excuses.
 
Wookie2u (talk | contribs)
Line 55:
* The cost of finding the end of the buffer (again) in ''strcat(buffer, ", ")'' is 15,270,965,703 (again).
* The cost of finding the end of the buffer (again) in ''strcat(buffer, word)'' is 15,270,965,703 (again).
* So the TOTAL COST is 15,270,965,710 * 3 + = 45,812,897,130 or about 45 billion clock ticks.
* 45 billion cycles at 2 billion cycles per second (my CPU is 2.01GHz) is about 22 seconds.
* 22 seconds to build a buffer! Ouch !!!!! !!!!! !!!!! !!!!! !!
 
----
 
== The Solution ==