Write a version of memset that does this optimization


One way to make a function like memset run faster is to have it write in word-sized chunks instead of byte-sized; this is likely to match the hardware better and might reduce the loop overhead by a factor of four or eight. The downside is that there are now a variety of end effects to deal with if the target is not aligned on a word boundary and if the length is not a multiple of the word size. Write a version of memset that does this optimization. Compare its performance to the existing library version and to a straightforward byte-at-a-time loop.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Write a version of memset that does this optimization
Reference No:- TGS02185725

Expected delivery within 24 Hours