[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/kdom/patternist
From:       Frans Englich <englich () kde ! org>
Date:       2006-10-31 23:16:51
Message-ID: 1162336611.059590.30536.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 600834 by englich:

This is the further optimizations I was thinking of. Contrast it to the discussion with Roberto.

CCMAIL: magic@magicninja.org


 M  +13 -0     IDEAS  


--- trunk/kdenonbeta/kdom/patternist/IDEAS #600833:600834
@@ -45,6 +45,19 @@
 * Rename MultiItemType to PrimeType? (FS)
 * Keep a singleton instance of the NodeBuilder?
 
+* Currently the FunctionFactories do two expensive lookups: all the signatures are iterated(if/then)
+  for finding a match, and then the same list is walked for creating the function. This is very
+  expensive. I believe it can be simplified by:
+  -) Creating a function for the creation of each signature and function. This can in some cases be
+     greatly simplified with the use of template functions(and below, instantiating them with pointers)
+  -) Insert into a hash that maps function names to member function pointers for creating signatures
+     and the functions. The hash would also cache created signatures.
+
+  It's probably appropriate to do this after the atomic string stuff is deployed.
+* Don't store maximum arguments in FunctionSignature since that can be derived from the length of
+  the argument list, except for the case of variadic functions. But that exception can be communicated
+  with an IsVariadic flag in Expression::Property. This will reduce the size of FunctionSignature.
+
 * Rewrite:
 	lower-case(lower-case(X)) to 	lower-case(X)
 	upper-case(upper-case(X)) to 	upper-case(X)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic