Does using large libraries inherently make slower code?

前端 未结 17 1547
情深已故
情深已故 2021-02-06 20:40

I have a psychological tic which makes me reluctant to use large libraries (like GLib or Boost) in lower-level languages like C and C++. In my mind, I think:

17条回答
  •  一生所求
    2021-02-06 21:29

    There may be a small overhead when loading these libraries if they're dynamically linked. This will typically be a tiny, tiny fraction of the time your program spends running.

    However there will be no overhead once everything is loaded.

    If you don't want to use all of boost, then don't. It's modular, so you can use the parts you want and ignore the rest.

提交回复
热议问题