Skip to content
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

Efficient swc build #476

Open
wants to merge 67 commits into
base: master
Choose a base branch
from
Open

Efficient swc build #476

wants to merge 67 commits into from

Conversation

mgeplf
Copy link
Contributor

@mgeplf mgeplf commented Oct 16, 2023

New SWC parser:

  • Parsing an SWC goes from 1.01ms to 0.700ms
  • Supports locales

uint32_t id = 0;
// create duplicate point if needed
if (!is_root && sample->point != start_point /*|| sample->diameter != start_diameter */) {
//if (!(is_root && sample->type == SECTION_SOMA) && sample->point != start_point /*|| sample->diameter != start_diameter */) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intentionally commented out?

Comment on lines +4 to +6
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
#define freelocale _free_locale
#define strtol_l _strtol_l
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment here concerning the freelocale?

Comment on lines +24 to +31
StringToNumber::StringToNumber()
#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
: locale(_create_locale(LC_ALL, "C")) {
}
#else
: locale(newlocale(LC_NUMERIC_MASK, "POSIX", nullptr)) {
}
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. It's not clear to me why these are configured this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants