Today I learned that we can check if 2d slices are equal using reflect.DeepEqual function in golang.

This isn’t fast because recursion is involved so writing an iterative loop is must faster.

I always thought we could use == operator but looks like we can’t (unlike 2d arrays) :/

so reflect.DeepEqual seems to be a syntactical sugar of sorts, which was what I wanted :P

~ updated at: 2026-03-22T11:53:52.785Z