On Fri, 30 Dec 2011, SF Markus Elfring wrote:
I imagine that a fine-tuned data exchange will improve the execution speed and
memory allocation requirements of source code analysis processes.
It will not.
I am surprised by this opinion.
It is a constant overhead.
I hope that the involved "overhead" can be reduced for script rules so that they
can specify the data types that are absolutely required for a specific task.
It has no impact.
The current file name handling has got an impact on my recent data export
experiments. I would appreciate for example if I can easily determine if a
source file name was changed for another code analysis.
I think that if you study the performace carefully, eg using the -profile
argument to spatch, you will see that any cost is somewhere else.
Normally parsing the C code is the most expensive thing. In particular,
if you are working on some software other than Linux, the parsing may fail
many times due to macros that it does not know about. In this case, it
may try to parse every top level object up to four times. If this is your
problem, you can find out about the problematic macros by running spatch
-parse_c on your software. In some cases, the number of metavariable
bindings or the number of paths considered by ... can also explode.
Coccinelle is written using functional programming. Every single step of
the process involves massive recopying of data structures. The language
is designed to do that efficiently. Exposing the internal representation
of position variables to the user will have no impact on performance, and
will just be more annoying for the user, who will have to make more field
dereferences.
julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)