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

   385   4   1
User Avatar
Member
3 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 - today 03:32:46
User Avatar
Member
8854 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
FX Supervisor
Method Studios, NY
User Avatar
Member
4733 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]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
3 posts
Joined: March 2024
Offline
tamte
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
That's very helpful. I will explore this website. Thank you
Edited by medicine - today 04:08:58
User Avatar
Member
3 posts
Joined: March 2024
Offline
animatrix_
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.

Thanks for the professional response
Edited by medicine - today 04:13:44
  • Quick Links