-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Combine code for sparse model functions and their index files (#2159)
Combine code for sparse model functions and their index files, i.e. generate only a single file instead of 3 individual files for content, rowvals, and colptrs, respectively. Advantage: Faster import of smaller models and fewer files. For a toy model, this reduced the build steps from 44 to 28, and reduced build time by >20% on my computer. Disadvantage: None found, so I don't think it worth adding an option for (not) combining those files. For larger models, there shouldn't be any impact. The extra time for compiling the index arrays should be negligible compared to computing the contents. Related to #2119 Here a test for a large model (N=1): | File | Size | Compilation time (s) | |--------------|--------:|---------------------:| | dwdx | 22.4MiB | 3413.64 | | dwdx_colptrs | 2.0KiB | 2.79 | | dwdx_rowvals | 65.6KiB | 2.66 | | *combined* | | 3416.79 | I'd consider this time increase negligible.
- Loading branch information
Showing
1 changed file
with
27 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters