Replies: 3 comments 4 replies
-
Could you give some disadvantage of C++ exception? |
Beta Was this translation helpful? Give feedback.
-
Exceptions have a very large performance loss compared to Status, and try catch has roughly 10 times the performance loss of an if statement. There is a benchmark https://quick-bench.com/q/7GrS5_yZDwcouuCPX-oJoMh2b2k |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
There are 3 status code in doris: AgentStatus, OLAPStatus, Status and I am trying to unify them to Status. But I find there are too many rubbish code when using status code. For example:
and this:
Most of these code is useless....
The error message should contain 3 components:
I find maybe we could just use CPP Exception to simplify programming and error messages. And the caller method do not need to check the return value in most times.
Beta Was this translation helpful? Give feedback.
All reactions