From -4481815981380998971
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,5be30c38f618a07b
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-05-03 10:34:01 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!kibo.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: Jean-Marc Bourguet <jm@bourguet.org>
Newsgroups: comp.std.c++
Subject: Re: Why switch w/ only integral types?
Date: Fri,  3 May 2002 17:33:25 GMT
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <3cd245ae$1@news.cadence.com>
References: <6ee7d287.0203202005.63e0b7b3@posting.google.com> <qfpm8.12422$cy2.680922353@newssvr21.news.prodigy.com> <3CCE6310.672E55DF@webmaster.com>
X-Trace: mail2news.demon.co.uk 1020447209 mail2news:29145 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Received: By mailgate.Cadence.COM as BAA25575 at Fri May  3 01:09:20 2002
Lines: 23
Xref: archiver1.google.com comp.std.c++:11009

David Schwartz <davids@webmaster.com> writes:

> 	In an event, switch/case is largely obsolete 

Virtual functions have reduced the need of switches, but not to the
level of making it useless or obsolete.  It is still the more clear
way to express some multiway conditions in C++.

> and on many platforms is actually slower than corresponding if/else
> code at low levels of optimization.

I wonder what make you concerned by the performance of low levels of
optimization.

-- 
Jean-Marc

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



