What is bottleneck?

I would like someone to briefly explain me what is bottleneck, what does bottleneck have with C++ coding etc.

thanks alot.

EDIT:
plese no link pasting, I have browser on my komp installed but just dont get the kocept.
Last edited on
A "bottleneck" is a point at which performance is hindered. It's named the bottleneck because the neck of a bottle is the thinnest part which allows the least amount of fluid to pass.

For example if you have a super fast 3GHz processor but really slow RAM that can only be accessed at 100MHz, that RAM is the bottleneck because nothing can move faster than it. All other faster systems are stuck waiting for the RAM.

In C++ and programming in general, the bottleneck typically refers to the slowest area of code in a program. Particularly one where performance is an issue.
Oh thanks, that was short clear enough :)
I've heard about profiling to reduce bottleneck.

can you as well explain how to perform profiling on some project and what it is in general.
closed account (zb0S216C)
Profiling is the process of finding bottlenecks within code. Profiling measures the amount of memory used by a particular function, and time taken to execute that function. This is the case for all invoked functions. Profiling occurs during run-time.

First, you would profile your code, then, you would locate any functions that take too long to execute, or use too much memory. When you've found one, you would go back to your code and fix it.

A bottleneck relates to profiling. On a single threaded program, a function that takes way too long to execute means that the main thread would have to wait; not a good thing. By profiling, you can seek those bottlenecks and fix them, or at least attempt to.

Wazzak
Last edited on
that may be optimizing and mooving a "bad guy" function to another thread may be one solution.

thanks for help both of you!
Topic archived. No new replies allowed.