Is libclang slower than using a tool based on clang drivers?

I am writing an autocomplete and syntax tool using libclang . I pretty much use the same code as in the c-index-test.c . But the speed of the results is very slow. There are several clang non libclang tools that are faster than my libclang tool.

Is there any optimization I can do to get results faster? My code pretty much looks like this:

 CXIndex cidx = CreateIndex(0,0); TU = clang_parseTranslationUnit(Cidx, 0, argv, argc,0,0...); 

etc.

Even the first time I run the clang tool, they seem to be faster.

Codebase I work tremendously.

+6
source share

Source: https://habr.com/ru/post/887137/


All Articles