Author: Dann Corbit
Date: 19:07:55 02/05/02
Go up one level in this thread
On February 05, 2002 at 21:59:22, Pham Minh Tri wrote: [snip] >Dann, I agree that switch is slow and should not use to replace memcpy (struct >assignment is also memcpy) in that case. Just joke because he did not ask about >effective or faster solution, but not using loops. OK, you must remember in the future that I am humor impaired. Even with a smiley in the title, I need help. Try this next time: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ;) <<== HEY DANN, THIS IS A SMILEY, SO I AM ONLY KIDDING AROUND!!! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ And maybe I won't screw up so badly. And since he wants no loop at all, we can just remove the switch like this: foo[0] = bar[0]; foo[1] = bar[1]; foo[2] = bar[2]; foo[3] = bar[3]; foo[4] = bar[4]; foo[5] = bar[5]; foo[6] = bar[6]; foo[7] = bar[7]; foo[8] = bar[8]; foo[9] = bar[9]; ... foo[n] = bar[n]; He already killed my lazy man trick be removing the struct wrapper as a solution. ;-)
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.