C and C++ don't compile with `-O2` or `-O3` by default.

Having `-d:release` be the default is bad because it means poor stacktraces and 
asserts don't work.

I think ease of debugging trumps performance for new people.

The proper way to deal with that is to have a FAQ and/or detailed articles/blog 
posts that explain what is going on.

We can even add an "info" hint after compiling that says. "Reminder: for full 
performance (non-debug) please use the -d:release flag and read on the 
-d:danger flag at nim-lang.org/building-nim-for-speed".

A cookbook that explains how to process strings would also be helpful.

Also I think we should invest in education, not just libraries (though a 
disclaimer at the beginning of strutils would help), the issue with slow string 
parsing is recurrent in all languages that don't use a GC and require the user 
to be aware that allocating memory in a loop is extremely slow.

A well-written article that explains that would also help more than the Nim 
community, similar to how many Linux distributions are using the Arch wiki as a 
reference for lots of low-level information.

Reply via email to