i wasnt expecting that answer...
how large was your friends table?
maybe it was quick when doing friends of friends because the friends table was already wholly loaded into memory?
i wonder if your relationship traversals spanned across different tables, if postgres would still be as quick?