[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12358] branches/particles/source/blender: PointCache functions for physics solvers to store their data in, includes a pointCache modifier that can read and write animation point c

Alexander Ewering blender at instinctive.de
Tue Oct 23 20:33:23 CEST 2007

On Tue, 23 Oct 2007, Stephen Swaney wrote:

> This falls into the category of 'ant f*cking', to use that charming
> Dutch expression.  Since the write is buffered, it is the equivalent
> of a memcopy to the i/o buffer and a check to see of there is enough
> stuff to flush to disk.

Quick test, just for my ego: ;)

#define SIZE 1024*1024*16
float *a = malloc(sizeof(float)*SIZE);

for (i=0; i<SIZE; i++) fwrite(&(a[i]), sizeof(float), 1, fp);

real    0m1.637s
user    0m1.173s
sys     0m0.407s

fwrite(a, sizeof(float)*SIZE, 1, fp);

real    0m0.436s
user    0m0.001s
sys     0m0.428s

Alexander Ewering

[ i n s t i n c t i v e . ]      instinctive mediaworks

Zur Waldeshoehe 6                    Tel.: 02393-220558
59846 Sundern                         Fax: 02393-220559
Germany                xx-mail: xx-mail.com/instinctive

More information about the Bf-committers mailing list