Added notes to the ftsort.cpp file about optimal memory-limit value

This commit is contained in:
Egor 2024-10-28 18:35:43 +03:00
parent ad976a5a9e
commit 783ed0f881

View file

@ -30,6 +30,10 @@ size_t get_mem_peak() {
return mem; return mem;
} }
// if we assume N as INPUT tape size, we can calucalte the optimal memory-limit
// by using this formula:
// X = sqrt(8000*N)
// where X is the optimal memory-limit value
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
AppSettings settings = parse_command_line(argc, argv); AppSettings settings = parse_command_line(argc, argv);
if (settings.version) { if (settings.version) {