The resulting files would be the same size and after you format them with mkswap would be identical in perfomance as swapfile.
One of the dd commands may be slightly faster than the other on a SD card, but not sure which. On reiserfs filesystem on a desktop linux system the first one take around 0.56secs and the second takes 1.8secs
A hexdump of the 2 file differs only in the files UUID which is stored around 0x400 bytes into the file.
Stu