[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:09:37 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.

Basically, that is correct. I'm not sure how relevant speed is in this case,
I guess it will only show in practice; however, your comparison is not quite
complete, as you're still missing the overhead of the function call to
fwrite(), for EACH vertex, and the various checks that the fwrite() call
performs, for EACH vertex. 
As inside Blender, we know better what we're doing, we could just fill a
buffer with the vertex data WITHOUT doing function calls and checks, and
then pass that buffer to fwrite in a SINGLE function call. Benchmarks would
probably show a speed increase of at least 100%, I'm pretty sure :) At least
for large amounts of vertices.

Anyway, I didn't want to tip on anyone's toe (no, really!) - this is just
the kind of thing that immediately catches my attention. (Just like digger
noises around my house).

Maybe I need more distraction :)

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