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

Remove altogether the Vector cache for MVPosition and Euler classes. #716

Merged
merged 1 commit into from
Jun 7, 2018

Commits on Mar 27, 2018

  1. Remove altogether the Vector cache for MVPosition and Euler classes.

    It was implemented using a thread_local storage, which means that
    the cache shouldn't be shared among different threads. This was
    unfortunely the case, since the MeasTable class creates some global
    objects that include instances of MVPosition derived classes. This causes
    undefined behaviours, since the constructors for thread_local variables are
    called before the destructors for the global variables, according
    to the C++11 standard. Running the tTableMeasures test triggered in fact
    a segmentation fault due to this.
    
    The original cache implementation didn't clean the memory, so the
    problem was simply hidden. The original idea of the cache is
    improve the performance, achieving around 5x boost when many objects
    are allocated and deleted. However, in a quick test I replaced
    Vector<Double> with std::array<double,3> (C++11) and I got a ~70x performance
    boost without any extra cache, so that might be a better route.
    
    Fixes CAS-10326
    cquike committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    f6fcc38 View commit details
    Browse the repository at this point in the history