[Kde-bindings] branches/work/kdebindings-smoke2

Arno Rehn arno at arnorehn.de
Thu Jul 19 19:51:00 UTC 2007


Am Donnerstag, 19. Juli 2007 schrieb Arno Rehn:
> SVN commit 689711 by arnorehn:
>
> * First steps to implement Richard's proposal of a global
>   "class name => smoke module" map.
Uhm, I just thought about that again. I would be possible, yes. But I think a 
major slowdown would come together with that change. Just imagine that cast 
function, it's currently based only on very fast switch statements. With a 
class name => smoke module map we'd have to do many strcmp() calls here to 
check what class we want to cast to.
For the type array we'd also have to implement such a map, which would 
possibly double or triple the memory consumption. Then is the access to the 
smoke instance via Indexes faster than with map::find(), as far as I know.
Still I think it's quite a good idea to have quick access to the smoke 
instances via the class name in a global map, so the current state could be 
kept. But performance will suffer if we completely drop the Index thing from 
Smoke, in my opinion.

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list