Help me optimize this code which enumerates all possible GUIDs | Hacker News Reader