Skip to content

Instantly share code, notes, and snippets.

Created October 27, 2010 17:40
Show Gist options
  • Save anonymous/649554 to your computer and use it in GitHub Desktop.
Save anonymous/649554 to your computer and use it in GitHub Desktop.
speed.erl
%% If this occurs in something that's called often (and might qualify as an inner loop,
%% or might not) does either method have a speed advantage?
[A,B,C] = [get_foo(S) || S<-["a","b","c"],
% versus
A = get_foo("a"),
B = get_foo("b"),
C = get_foo("c"),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment