Describe Current Status and Possible Solution
Background
- Many data are stored in HTML-formatted file, for example the coefficients of spherical bessel function bessel_basis.cpp:line 337. To access data with higher efficiency, rather than search for data in certain line with time complexity O(N^2), HTML parser with mapping strategy will be a good choice.
- In input module, the way to parse INPUT file now is still the one-by-one strcmp method. Map can also be used here to reach a at least O(N^2) to O(NlogN) speed-up.
Problem
the C++ STL has non-negligible extra memory cost (including std::vector, std::map, etc), this will bring about unexpected memory cost problem to the overall program. To reproduce, use the toy HTML parser I write to parse UPF-formatted pseudopotential file. Although in principle the speed of accessing data will be higher, but memory cost now is terribly high.
html_parser.zip
Possible solution
Build containers by ourselves, so as to avoid extra memory cost by redundant functions and data.
Additional Context
No response
Describe Current Status and Possible Solution
Background
Problem
the C++ STL has non-negligible extra memory cost (including std::vector, std::map, etc), this will bring about unexpected memory cost problem to the overall program. To reproduce, use the toy HTML parser I write to parse UPF-formatted pseudopotential file. Although in principle the speed of accessing data will be higher, but memory cost now is terribly high.
html_parser.zip
Possible solution
Build containers by ourselves, so as to avoid extra memory cost by redundant functions and data.
Additional Context
No response