r/adventofcode • u/daggerdragon • Dec 04 '15
SOLUTION MEGATHREAD --- Day 4 Solutions ---
--- Day 4: The Ideal Stocking Stuffer ---
Post your solution as a comment. Structure your post like the Day Three thread.
14
Upvotes
View all comments
Show parent comment
2
u/adriweb Dec 04 '15 edited Dec 04 '15
Probably indeed, I'll try :)
Edit: surprisingly, no! With part 2, 6.6s with
strposand 6.9s withsubstr. I haven't looked at the internal, but I suppose strpo doesn't allocate a new string, making it faster.