Menu

Extra results in Windows?

Ryan
2018-06-14
2018-06-20
  • Ryan

    Ryan - 2018-06-14

    I've been doing some comparisons between how cppcheck runs in Windows vs Linux and I noticed that Windows tends to have a few extra errors that are missing from the Linux reports. I'm using 1.8.4 for both. Is this something that's expected? If not and it helps, I can see this happen when running against lighttpd-1.4.49, among others.

    For Windows I tried both the precompiled binary and my own build which give the same results. On linux I built it using make SRCDIR=build CFGDIR=cfg HAVE_RULES=yes CXXFLAGS="-O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-unused-function" as the docs recommend.

    Another thing I noticed is that there seems to be a very big difference in performance between platforms. Windows consistently takes around 1.75 or so times longer than Linux with the same hardware.

     

    Last edit: Ryan 2018-06-14
  • versat

    versat - 2018-06-20

    I can imagine that Cppcheck outputs some different messages on Windows vs. Linux because it uses different configuration files for the systems (at least if you use the native platform).
    Or did you specify exactly the same parameters including the platform and get different results?
    Could you add both command lines for calling Cppcheck on lighttpd under Windows and Linux?

    Regarding the performance i can not say much. I do not know enough about the internals of Cppcheck and i guess it is normal to get different timings on Windows vs. Linux for such programs like Cppcheck that use much RAM/CPU and have different (multi threading, file handling, ...) API/library/OS internals. But maybe Cppcheck simply is not optimized that much on Windows.
    Maybe someone who knows more about it can tell us something :)

     
  • Ryan

    Ryan - 2018-06-20

    Ah, okay so that's it. I wasn't specifying a platform. Thanks!

    But yeah I can imagine performance isn't exacly an easy problem to tackle. For now though just giving it a bunch more threads helps a lot to speed it up across the board, even if Windows still is slower.

     
  • Daniel Marjamäki

    Yeah it's a lot faster in Linux.

    I don't know if this is the real explanation, but I thought this article was pretty interesting:
    https://www.zdnet.com/article/anonymous-msft-developer-admits-linux-is-faster-than-windows/

    I do believe that too much focus on "business driven" development is bad. It tends to focus too much on function growth and too little on quality.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.