You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hash tables are large and must be persisted in memory. Further, all these tables are computed at runtime on the heap. This won't scale as more languages are added. Ideally as much is done in the stack as possible.
A naive linear search should be implemented that does not split by whitespace.
An alternative, a build script to format the words file as a static Rust file with a hardcoded lookup table, was considered, but this will still take up more memory compared to a string. Considering this lookup needs to happen rarely, while the table will be in-memory for the duration of the program, it's best to optimize for space at the cost of time in this case.
The text was updated successfully, but these errors were encountered:
Hash tables are large and must be persisted in memory. Further, all these tables are computed at runtime on the heap. This won't scale as more languages are added. Ideally as much is done in the stack as possible.
A naive linear search should be implemented that does not split by whitespace.
An alternative, a build script to format the words file as a static Rust file with a hardcoded lookup table, was considered, but this will still take up more memory compared to a string. Considering this lookup needs to happen rarely, while the table will be in-memory for the duration of the program, it's best to optimize for space at the cost of time in this case.
The text was updated successfully, but these errors were encountered: