[Freeciv-Dev] [patch #4949] [Metaticket] Get rid of massive switch-cases

2014-12-31 Thread Jacob Nevins
Follow-up Comment #3, patch #4949 (project freeciv): Sorry to jump in on this so late, after you have done work... > We have a couple of switch - case constructs with a lot of > cases (packet handling has a case for each packet number, ai > effect evaluation for each effect type). While I haven

[Freeciv-Dev] [patch #4949] [Metaticket] Get rid of massive switch-cases

2014-12-15 Thread pepeto
Update of patch #4949 (project freeciv): Depends on: => patch #5566 ___ Reply to this item at: ___ Message pos

[Freeciv-Dev] [patch #4949] [Metaticket] Get rid of massive switch-cases

2014-12-15 Thread pepeto
Update of patch #4949 (project freeciv): Depends on: => patch #5568 ___ Reply to this item at: ___ Message pos

[Freeciv-Dev] [patch #4949] [Metaticket] Get rid of massive switch-cases

2014-12-15 Thread pepeto
Update of patch #4949 (project freeciv): Depends on: => patch #5567 ___ Reply to this item at: ___ Message pos

[Freeciv-Dev] [patch #4949] [Metaticket] Get rid of massive switch-cases

2014-12-15 Thread pepeto
Update of patch #4949 (project freeciv): Depends on: => patch #5565 ___ Reply to this item at: ___ Message pos

[Freeciv-Dev] [patch #4949] [Metaticket] Get rid of massive switch-cases

2014-11-25 Thread pepeto
Update of patch #4949 (project freeciv): Depends on: => patch #5461 ___ Reply to this item at: ___ Message pos

[Freeciv-Dev] [patch #4949] [Metaticket] Get rid of massive switch-cases

2014-11-17 Thread Frank
Follow-up Comment #2, patch #4949 (project freeciv): If your var is one of the "specenum" thingies used here, and you optimize for size, the machine code should be a jump table to the function calls. 20 years old observation, the point being, a compiled switch does not necessarily compare cases

Re: [Freeciv-Dev] [patch #4949] [Metaticket] Get rid of massive switch-cases

2014-07-14 Thread Vasco Alexandre da Silva Costa
Using function pointers is seldom a good idea. Also what will you do if the function calls take different parameters? On Mon, Jul 14, 2014 at 9:17 AM, Marko Lindqvist < no-reply.invalid-addr...@gna.org> wrote: > URL: > > > Summary: [Metaticket] Get

[Freeciv-Dev] [patch #4949] [Metaticket] Get rid of massive switch-cases

2014-07-14 Thread Emmet Hikory
Follow-up Comment #1, patch #4949 (project freeciv): Modern optimising compilers sometimes compile into a branch table, which is precisely as efficient as an array of pointers to pointers to functions (so nearly, but not quite as efficient as an array of pointers to functions), but this isn't alwa

[Freeciv-Dev] [patch #4949] [Metaticket] Get rid of massive switch-cases

2014-07-14 Thread Marko Lindqvist
URL: Summary: [Metaticket] Get rid of massive switch-cases Project: Freeciv Submitted by: cazfi Submitted on: Mon 14 Jul 2014 11:17:00 AM EEST Category: None Priority: 5 - Norma