|
|
|
|
|
by sylvestre
1609 days ago
|
|
Good question! Probably not.
In general, functionalities are enabling or disabling a behavior when doing an operation. In the code, it translates most of the time by a simple if else.
For example, adding new options usually looks like this PR:
https://github.com/uutils/coreutils/pull/2880/files The performance wins are usually produced by using some fancy Rust features. |
|
Also ‘if’ causes branching which costs a small amount of CPU overhead. So it’s not a free operation and can quickly add up if you needed inside a hot path.