Replies: 5 comments
-
I was thinking about moving vocab preprocessor definitions to |
Beta Was this translation helpful? Give feedback.
-
First step: #1764 |
Beta Was this translation helpful? Give feedback.
-
After merging #1764 the next step is to change all the
in
|
Beta Was this translation helpful? Give feedback.
-
I suggest to add in namespace yarp {
namespace conf {
// [...]
typedef std::int32_t vocab32_t
}
} and to return This will allow us (one day) to change easily from signed to unsigned and will also save us from big issues in case, one day, we wanted to to have a 64 bit vocab |
Beta Was this translation helpful? Give feedback.
-
I noticed reviewing #1924 that
|
Beta Was this translation helpful? Give feedback.
-
We could replace all the
define
s around yarp with constexpr, but more important we can use theconstexpr
functions.The
constexpr
functions has the limitation of that they have to have only onereturn
statement and they have to handle data that is defined compile time.The
constexpr
variables and functions are defined compiled time and put in read-only memory.More computation we move from the run-time to the compilation more the code will run faster!
For example functions of conversion between measurement units should be constexpr.
Beta Was this translation helpful? Give feedback.
All reactions