switch vs if

From: Chris Powell (darkness@CHESHIRE.GATOR.NET)
Date: 05/03/98


WHich is quicker
if (this == that || this == that2)
or
switch (this) {
  case that:
  case that2:

Chris Powell           * I don't have bugs, I have   * I don't crash, I
http://patch.gator.net * randomly developed features * have random reboots

Expect the worst, hope for the best, be thankful for the few errors you get.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST