-
Notifications
You must be signed in to change notification settings - Fork 1
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
It is slow in Microsoft #7
Comments
News: Previously I though that the problem was the use of Eigen, whose inline functions can cause incompatibilities with msvc compiler. After checking the code again, looks like Eigen is not the problem. Measuring times in the code I've found that most of the time is spent in the function AppendChunk (When creating the sparse matrix). Looks like the problem is the Microsoft implementation of malloc and realloc. Link 1: Explanation of why realloc function could be slower in microsoft that in Linux/Mac. |
After searching for alternatives, looks like the problem is the compiler implementation of those functions. We have to wait till another compiler is supported like MinGW. Refer to issue #60. |
This doesn't sound like a satisfactory explanation to me. I'll take a look at AppendChunk(), but it seems to me we could pre-allocate larger chunks of memory to use and release the unused portion at the end (or re-allocate additional memory, if needed, a small number of times by allocating with a large chunk size). I assume the only reason we are iteratively allocating memory is because the sparsity pattern is unknown until we compute the matrix. I suspect an algorithmic improvement here could be useful... |
It could be because of the used compiler: Visual Studio 2019.
The text was updated successfully, but these errors were encountered: