-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[io] Improve PCD read performance (more than 50%) by reusing istringstream
#4339
Conversation
istringstream
istringstream
I'm not going to review this one. I have no progress on it. |
The changes look ok, but I feel that there has to be a nicer way to do all this. What about |
AFAIK, these functions are locale dependent. In C, the locale is global and changing locale might affect downstream users during loading of a file.
I've marked that issue as help-wanted because I couldn't refactor it cleanly without touching quite a few lines. I too would like to see a cleaner implementation than this low hanging fruit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree to @mvieth observations, but as you write @kunaltyagi it can be left for another day :)
50% performance increase, is also quite nice!
detail::copyStringValue<Type> (st, cloud,point_index, field_idx, fields_count, is); | ||
} | ||
template <typename Type> inline void | ||
copyStringValue (const std::string &st, pcl::PCLPointCloud2 &cloud, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new functions lacks the documentation, especially regarding is
. Also: "Uses aoti/atof to do the conversion." isn't really correct anymore.
Single threaded performance increases by approximate 50%
#4333 (comment)