[Bf-committers] How about adding boost uBLAS library toblender/extern?

Shaul Kedem shaul.kedem at gmail.com
Mon Jan 26 15:08:19 CET 2009


Guys,

 Before jumping on the C++ wagon please consider the following:
 - C is the main language used by the current developers, that's what
they know best.
 - C++ is a superset of C, which means C++ can never be faster than C..
 - Template based coding is hard to debug, sometimes impossible
(believe me, when u see gdb crash it's not a pretty sight)
 - C is simpler and compilers are better in optimizing C code

It's not a fluke that linus didn't switch to C++ for linux - he has
good reasons for it. UI is nice in C++, even some other things more
related to data manipulation, but kernel work should remain in C, and
if I'll take Yves' argument and reverse it - there is no reason why we
can't learn from eigen and code the same optimizations in C,

Regards,
Shaul

On Mon, Jan 26, 2009 at 8:15 AM, Yves Poissant <ypoissant2 at videotron.ca> wrote:
> From: "joe" <joeedh at gmail.com>
> Sent: Monday, January 26, 2009 5:18 AM
>
>
>> Ugh, porting the render code to c++ would be a really bad idea.  It's
>> highly optimized for C.
>
> I wonder what this "optimizition for C" really means. The renderer is very
> far from fast and thus certainly far from optimized in one way or another.
> It might be optimized for C but I think the rendering pipeline itself needs
> some fundamental conceptual revision. Just optimizing C statements does not
> cut it and some old C optimization tricks are actually detrimental to modern
> CPU architectures. And given that C++ is a superset of C, any C optimization
> trick that are actually efficient could be ported to C++ as well.
>
> I suggest that porting the renderer to C++ might be beneficial even if not
> totally "optimized for C" if some other aspects can be optimized such as the
> vector/matrix and color calculations. At least, that might be the first step
> to a gradual refactoring of the renderer. That just said, I believe that a
> more profound refactoring than simply porting or improving is needed.
>
> Just for my own education, I would like to be pointed to some of those C
> optimization tricks in Blender renderer that could not be ported to C++.
>
> ---
>
> The Eigen2 library looks very interesting. Very, very interesting.
>
> Yves
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list