Re: C switch() statement
| From: | Andi Gutmans | Date: | Fri, 28 Jan 2000 15:20:11 +0000 |
| Subject: | Re: C switch() statement | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-14979@lists.php.net to get a copy of this message | ||
At 09:00 AM 1/28/00 -0500, rasmus@php.net wrote:
Do you guys know a way to hint to GCC that the values the switch() will get will always be one of the case: statements so that it can optimize it? I found a way in Visual C++ and it made the switch() statement 5 opcodes instead of 10. I deleted your previous commit msg a little too fast. How do you do this hint in Visual C++? -Rasmus#if (WINNT|WIN32)
default:
__assume(0);
break;
#endif
---
Andi Gutmans <andi@zend.com>
http://www.zend.com/