Re: Class.c

From: George Greer (
Date: 06/21/02

On Fri, 21 Jun 2002, Dante Mavec wrote:

>> What comment?
>Just before int backstab_mult(int level)
> * This simply calculates the backstab multiplier based on a character's
> * level.  This used to be an array, but was changed to be a function so
> * that it would be easier to add more levels to your MUD.  This doesn't
> * really create a big performance hit because it's not used very often.
> */

But that's not a switch(), it's a bunch of if...else.  You were talking
about switch the language construct, or were you trying to be more broad?.
The switch statements are worse because they have large numbers of
different values while backstab_mult() just has a very few branches. And
backstab_mult() is used even less frequently the saving throws table.

George Greer

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT