Are there any general performance tips that you've come across that aren't immediately obvious?
Stuff like:
If performance is an issue I usually just try to profile with Apple's profiling tools in XCode or the equivalent in Linux, but I don't feel like I've developed a sense yet for how to write really idiomatic, performant code "the first time".
If nothing else, it would be a good blog post ;)
@def I mean to ask why there would be a difference between:
proc main() = discard
when isMainModule:
main()
instead of just:
proc main() = discard
main()
@euant I can't follow that reasoning. I use "when isMainModule" for test code in libraries or to try quickly stuff in modules which normally get included but are in development. It would not mean anything regading "global code" if I scanned my codebase for "isMainModule". It would if I scan for main() though, as this is what I use instead of "global" usually now.