Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

hurr

Name: Anonymous 2009-04-30 13:13

Why is memset faster than for-index-loop setting?

Name: Anonymous 2009-04-30 13:14

Because it saves it to memory rather than having to constantly go back and forth on the hard disk durr.

Name: Anonymous 2009-04-30 13:45

>>1
Read SICP

Name: Anonymous 2009-04-30 14:26

>>1
Depends on your compiler and C library, and how you do it. Sometimes it's not faster. But in the cases that it is, it'll be a combination of setting memory using the machine word size for maximum efficiency, and optimized assembly language routines.

e.g. on x86 using rep stosd / stosb rather than looping a mov

Name: Anonymous 2009-04-30 14:38

>>4
DON'T HELP HIM!

Name: Anonymous 2011-02-04 13:19

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List