5. Use XDR and htonl to encode a 1000-element array of integers.
Measure and compare the performance of each. How do these
compare to a simple loop that reads and writes a 1000-element
array of integers? Performthe experiment on a computer for which
the native byte order is the same as the network byte order, as well
as on a computer for which the native byte order and the network
byte order are different.
6. Write your own implementation of htonl. Using both your own
htonl and (if little-endian hardware is available) the standard
library version, run appropriate experiments to determine how
much longer it takes to byte-swap integers versus merely copying
them.