forked from scratchfoundation/scratch-vm
-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Labels
performanceIdeas for improving performanceIdeas for improving performance
Description
Static Typed Mode
Static typing for variables, parameters and lists
TurboWarp could have a mode called "Static Mode" whose would force static typing for the compiler.
Benefits
- Prevention of JavaScript Deoptimizations (reduce JIT workloads). code could run as fast as native
- Won't change the behaviour in the Vanilla Runtime
OBS:. This proposal is just a sketch
Benefited Scratch projects
- Emulators
- Raytracers
- 3D Games
- (Projects that uses intesive type checking)
Avaliable Types
- integer -> equivalent to integer
- decimal -> equivalent to float
- text -> equivalent to a string
- byte -> a small integer (0-255) that can be converted to a character
Semantics
Variables
Name should always ends with the desired type

Mutations
Parameters names should always ends with the desired type

Lists
Metadata
Metadata
Assignees
Labels
performanceIdeas for improving performanceIdeas for improving performance
