Table of Contents
You'll generally want to look at:
- heap
- stack
- gc profiles
Do not get bogged down in microoptimizations before you've assessed any macro optimizations that are available. IO and the choice of algorithm dominate any low level changes you may make. In the end you have to think hard about your code!
Topos> For example, if i see that a particular pure function is taking a long time relative to the rest of the code, and that it's Text, and I'm seeing ARR_WORDS rise linearly in the heap, I probably have a thunk-based memory leak. This is knowledge you build up over time.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o errexit | |
echo "Removing exited docker containers..." | |
docker ps -a -f status=exited -q | xargs -r docker rm -v | |
echo "Removing dangling images..." | |
docker images --no-trunc -q -f dangling=true | xargs -r docker rmi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bash | |
# Usage: | |
# ./git_move.sh git@repo_site.com:/my_repo.git origin/folder/path/ /destination/repo/path/ new/folder/path/ | |
repo=$1 | |
folder=$2 | |
dest_repo=$3 | |
dest_folder=$4 | |
clone_folder='__git_clone_repo__' |