nimble-code / Cobra

An interactive (fast) static source code analyzer
139 stars 31 forks source link

Use of threads in Cygwin #7

Closed keck-in-space closed 4 years ago

keck-in-space commented 4 years ago

Hello,

I noticed something interesting about using Cobra with Cygwin. When I specify the number of threads to be one (-N1), the processing is significantly faster, about 1.9x faster than without the flag in my testing.

From what I can tell this is a platform specific issue, but I wasn't sure if Cobra could run with -N1 by default in the case where Cygwin is detected.

P.S. I was also curious how many threads are spawned by default in Cobra.

nimble-code commented 4 years ago

that's interesting. does your configuration enable multi-threading by default? (that would be in the $HOME/.cobra startup file). there shouldn't be any difference between using -N1 or no -N flag at all, if single-core is the default. In single-core mode (or the default) there's no multi-threading used for anything....

nimble-code commented 4 years ago

(I'm assuming the current version of the Cobra code that's here on github.)

keck-in-space commented 4 years ago

I made a mistake in my configuration. Please disregard this. My apologies. It appears the flag has no effect as you suggested.

I'm unable to find the configuration file you mentioned. It isn't in my home directory. I am using v3.1 December 18, 2019.

nimble-code commented 4 years ago

the .cobra file is created when you install the tool (with cobra -configure ...)