Welcome, Guest. Please login or register.

Author Topic: jump tables (-Edit- Eliminating conditional statements :-))  (Read 13668 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline itix

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 2380
    • Show all replies
Re: jump tables
« on: February 21, 2005, 04:54:33 PM »
Quote
Suppose for a moment we have an event stream, some events can be handled simply by updating a variable... others would require calling several functions....

If you are updating same variable then switch/case is better... depending on code used GCC can produce code without conditional branches.

Regarding jump tables... it seems that it does not good for branch prediction...
My Amigas: A500, Mac Mini and PowerBook