Is a DLL slower than a static link?

前端 未结 4 1044
不思量自难忘°
不思量自难忘° 2021-02-19 14:02

I made a GUI library for games. My test demo runs at 60 fps. When I run this demo with the static version of my library it takes 2-3% cpu in taskmanager. When I use the DLL vers

4条回答
  •  庸人自扰
    2021-02-19 14:59

    It's a little unclear as to what's being statically/dynamically linked. Is the DLL of your lib statically linked with its dependencies? Is it possible that the DLL is calling other DLLs (that will be slow)? Maybe try running a profiler from valgrind on your executable to determine where all the CPU usage is coming from.

提交回复
热议问题