There is a potentially large (O(data size)) stack allocation in BPCompare(), which caused bpcomp to crash when run on a bigger data set and number of cycles (~500 proteins, 20 000 cycles). This has been mitigated by modifying the function so that is uses std::vector for heap allocation in place of VLAs on the stack (which aren't portable/standard C++ anyway).
The Makefile has also been modified so that the compiler and the linker receives the -flto flag. Most modern C++ compilers support this flag, and it demonstrably improves the performance of the emitted code.
There is a potentially large (O(data size)) stack allocation in
BPCompare()
, which causedbpcomp
to crash when run on a bigger data set and number of cycles (~500 proteins, 20 000 cycles). This has been mitigated by modifying the function so that is usesstd::vector
for heap allocation in place of VLAs on the stack (which aren't portable/standard C++ anyway).The Makefile has also been modified so that the compiler and the linker receives the
-flto
flag. Most modern C++ compilers support this flag, and it demonstrably improves the performance of the emitted code.