Regarding materials, there will be no difference. Here is a picture.

The picture shows two 10x10 squares.
The number of blocks (ie. Railway) will be the same to create a path from one corner to the other.
I also conducted an experiment using a Minecart without passenger (I initially sat in it, but the inertia brought me very far away thus I did it without a passenger) and it turns out that the one on the left travelled 8 blocks whereas the one on the right travelled 11 blocks.
Therefore, to answer your question based on this little experiment:
- The materials used will be the same.
- A diagonal track is more efficient in terms of distance.
However, do note that if doing this in the nether and digging a path through netherrack, a diagonal path is a lot more inconvenient to dig and walk through (you'll just hit your arms and body on the wall left and right :P), unless the diagonal path is widened.
Hope this helps!