Add a new section on maintainability

This commit is contained in:
Jason Turner
2015-06-08 10:44:17 -06:00
parent 6d21a04e79
commit 5c7340061d
9 changed files with 37 additions and 26 deletions

View File

@@ -0,0 +1,11 @@
# Considering Threadability
## Avoid Global Data
This includes statics and singletons.
Global data leads to unintended side effects between functions and can make code difficult or impossible to parallelize. Even if the code is not intended today for parallelization, there is no reason to make it impossible for the future.
## Avoid Heap Operations
Much slower in threaded environments. In many or maybe even most cases, copying data is faster. Plus with move operations and such and things