POV-Ray : Newsgroups : povray.off-topic : Programming language discussion : Re: Programming language discussion Server Time
3 Sep 2024 23:24:30 EDT (-0400)
  Re: Programming language discussion  
From: Warp
Date: 18 Nov 2010 09:15:47
Message: <4ce53513@news.povray.org>
Nicolas Alvarez <nic### [at] gmailcom> wrote:
> I know someone who got this to work via C++ operator overloading and other 
> nasties:

> Vector3D a, b;
> a.xy = b.zx;

> It's equivalent to a.x=b.z; a.y=b.x; Any combination of xyz letters would 
> work, probably even a.xxx=b.yzy;

  All to save typing a few extra characters... :P

> IIRC it even used SSE inline assembly to do the assignments.

  And probably hindering any possibility for the compiler to perform
optimizations resulting in even more efficient code...

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.