Would Rewriting Houdini’s VEX Using C++20 Significantly Boost

   1650   2   1
User Avatar
Member
2 posts
Joined: March 2024
Offline
What if VEX were reimplemented using C++20?

Would it lead to noticeable performance improvements in terms of compilation?
Edited by medicine - Jan. 10, 2025 14:56:12
User Avatar
Member
9380 posts
Joined: July 2007
Online
While I can't speak to how or whether using c++20 or c++23 would affect performance or compilation time

Houdini tries to follow VFX reference platform [vfxplatform.com] for maximum compatibility, and that still suggests c++17 even for 2025
Edited by tamte - Jan. 3, 2025 10:21:17
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
5100 posts
Joined: Feb. 2012
Offline
Rewriting VEX in C++20 wouldn’t make much difference in performance IMO. VEX is already optimized for Houdini, and runtime or compilation speed gains would be negligible. The real performance improvements would come from changes to the VEX compiler and addressing current bottlenecks, like:

Batch Attribute Access: Fetching attributes one by one is a major slowdown. Functions to fetch multiple attributes at once would reduce overhead significantly.

Geometry Creation: Creating geometry in VEX is much slower than with HDK. Optimizing this process would bring massive performance gains IMO.

Compiler Optimizations: Smarter optimizations at the compiler level, like better vectorization or reducing redundant operations, would yield much bigger benefits than switching to newer C++ versions IMO.

Right now with complex code, matching, approaching, and sometimes surpassing C++ speeds with VEX requires a lot of tricks and a deep understanding of how to write highly optimized VEX code.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
  • Quick Links