[BOLT] perf

how fast can Bolt 1, Bolt 2, and Unity Visual Scripting (apparently based on Bolt) be

as apparently Bolt is meant to be like, super fast for integer/float calculations (in tens of nanoseconds range) right?

how does such compare to modern JIT’s such as LuaJIT ( still the fastest JIT ? ), C#, Java, ect

and modern C/C++ compilers such as LLVM 17
(given, embedding a C++ compiler and having it function as a JIT (eg, transpile to C++, compile to LLVM IR/OBJ, link with running application + execute, all at runtime without recompiling entire application) is a large task)

Bolt 2 doesn’t exist, was canceled by Unity 3.5 years ago after they acquired the tool and brand. Its performance was close to C# since it did generate actual C# code automatically from graphs.

Bolt 1 from 2018 and Unity Visual Scripting of today are practically identical. Same reflection based runtime, same performance killing issues like holding variables in large <string, object> dictionaries so there’s a ton of type boxing.

First time I’m hearing Bolt/Visual Scripting is meant to be fast, it’s one of the slowest Visual Scripting solutions on the market. Can work for some games, but generally doesn’t scale and is some 5-10x slower than C# based on a use case. Although, modern hardware can brute force this thing in most contexts, anyway.

I can’t really comment about C++, LuaJIT, etc since all of that is not easily available in Unity and is not exactly common.

Unity have been working on a new per-node code-gen runtime behind the scenes for many years now with promises up to 10-12x perf increase over current Visual Scripting, but it’s nowhere in sight. Maybe in Unity 7.

1 Like

No. You’re likely thinking of the visual scripting that was supposed to be made for DOTS. Unity Visual Scripting (aka Bolt 1 like @PanthenEye said) is very slow compared to C#. I remember @Andy-Touch mentioning how the internal Gigaya project started with it but it was eventually ripped out because of all the performance problems.

https://discussions.unity.com/t/891252/20

1 Like

There is no point talking about performance of visual scripting in Unity in general. If you use any of the existing Visual Scripting solutions, you don’t care about performance and that’s the end of the story.

sorry, it was Blast that i got confused with

(where do i post BLAST questions in)

BLAST currently features:

  • Datatypes: float, float2, float3, float4, int, int2, int3, int4, bool32, constant length arrays
  • Control flow instructions: switch, while, for, if then else
  • External function support, with the interface defined through codegen for ultimate performance
  • The Unity Mathematics library directly accessible through script
  • Flexible datasegment mapping, you can move the data and stack pointers to directly work on the data instead of copying it.
  • Define inputs in script that map to arrays of floats.
  • Extremely compact bytecode compiled from script in milliseconds. Byte sized instructions, 7bit addressing and smart constant handling result in bytecode that make surprisingly large scripts fit in a single cache line with the resulting performance benifits.
  • Simple but powerfull compiler that flattens the input script and removes all nesting resulting in a linear execution path with minimal stack use and branching.
  • Extremely fast execution. “A = Sin(x)” takes only 40ns to interpret, this is 10x faster then a leading jit script compiler. In ssmd mode it can process the same script in 1.5 nanoseconds, 750.000.000 times per second on 1 thread.

Post them here: https://discussions.unity.com/t/890314