summaryrefslogtreecommitdiffstats
path: root/platform/javascript/api/javascript_singleton.h
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2023-07-28 13:08:21 -0300
committerGeorge Marques <george@gmarqu.es>2023-07-28 13:08:21 -0300
commitc1bca65d09b78dafafc496dcf47782e30887cf6e (patch)
tree017763c0e35c45e3be772af17b15ef773d6a66fa /platform/javascript/api/javascript_singleton.h
parent202e4b2c1e7f8b25738b93d0e4d5066453d3edf3 (diff)
downloadredot-engine-c1bca65d09b78dafafc496dcf47782e30887cf6e.tar.gz
GDScript: Optimize operators by assuming the types
This assumes that operators are called usually with the same type of operands as the first time. So it stores the types of the first run and if matched it uses an optimized path by calling the validated operator function directly. Otherwise it uses the regular untyped evaluator. With this change, if operators do use the same type they run quite faster. OTOH, if the types mismatch it takes longer to run than they would with the previous code.
Diffstat (limited to 'platform/javascript/api/javascript_singleton.h')
0 files changed, 0 insertions, 0 deletions