FAST "shebang" for C
This is my first post here so hopefully I'm doing this right. I found this thread https://news.ycombinator.com/item?id=9144467 from a while back and it got me experimenting with similar things. I found this solution which seems to be MUCH faster:
//usr/bin/env gcc `basename "$0"` -o _;./_ "$@";rm _;exit
When you make a C source file, say hello.c with this as the top line, and just run it directly, this line will call gcc on it's own file name, and compile to a file just called _ (underscore). Then it will execute it, forwarding all arguments to it, then remove it, then exit (so it doesn't try interpreting C code as bash or whatever). The whole thing is blazing fast, much faster than some popular solutions I found on GitHub even.