Would Rewriting Houdini’s VEX Using C++20 Significantly Boos
385 4 1- medicine
- Member
- 3 posts
- Joined: March 2024
- Offline
- tamte
- 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
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
FX Supervisor
Method Studios, NY
- animatrix_
- 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.
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
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
- medicine
- Member
- 3 posts
- Joined: March 2024
- Offline
tamteThat's very helpful. I will explore this website. Thank you
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 medicine - today 04:08:58
- medicine
- 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