Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building Projects: Optimise various make_colour...(), string...(), and maths functions which have constant arguments during the compiler phase #5688

Closed
1 of 2 tasks
rwkay opened this issue Apr 30, 2024 · 16 comments
Assignees
Labels
documentation Improvements or additions to documentation are required by this issue feature request New feature (or a request for one)
Milestone

Comments

@rwkay
Copy link

rwkay commented Apr 30, 2024

Description

Currently the GM compiler will optimise certain functions that have constant parameters i.e. ord, chr, int64, real, string, is_method, variable_get_hash, os_get_config, buffer_sizeof.

We should expand this list to include common maths and colour functions

Compiler would optimise out functions that can be evaluated at compile time, because all the params are constant and the function itself is deterministic, candidates would include

  • make_colour_rgb, make_color_rgb
  • string_lower
  • string_upper
  • sin, cos, tan, arcsin, arccos, arctan, arctan2
  • ceil
  • floor
  • round
  • degtorad
  • radtodeg

They should be evaluated at compile time and be replaced by a constant that can be used at runtime.

Expected Change

See above

Steps To Reproduce

No functionality would be changed it would work as it should

How reliably can you recreate this issue using your steps above?

Always

Which version of GameMaker are you reporting this issue for?

2024.2.0 (Monthly)

Which platform(s) are you seeing the problem on?

Windows

Contact Us Package Attached?

  • I have attached my Contact Us Package

Sample Project Added?

  • I have included a small sample project
@rwkay rwkay added the runner-bug In-game bugs with the "GameMaker Studio 2" runtimes label Apr 30, 2024
@rwkay
Copy link
Author

rwkay commented Apr 30, 2024

Here is a test project for the current functions that were added...
OptimisationTests.zip

@rwkay rwkay added feature request New feature (or a request for one) and removed runner-bug In-game bugs with the "GameMaker Studio 2" runtimes labels Apr 30, 2024
@tinkerer-red
Copy link

Relating to string literal optimizations, Here is a test for use with GM Benchmark. As a note, I see no reason a developer should combine to string literals, but was always told "the compiler is smarter then you" so it really shouldn't allow for such back practice.

Also please note that $"{a}{b}" is extremely slow:
image
image

new Benchmark("String Joining", [
			new TestCase("Add <literal>", function(iterations) {
				repeat (iterations) {
					var _test = "a"+"b"
				}
			},
			function(iterations) {
				
			}),
			new TestCase("Add <variable>", function(iterations) {
				repeat (iterations) {
					var _test = string(a)+string(b)
				}
			},
			function(iterations) {
				a = "a"
				b = "b"
			}),
			new TestCase("string_concat <literal>", function(iterations) {
				repeat (iterations) {
					var _test = string_concat("a", "b")
				}
			},
			function(iterations) {
				
			}),
			new TestCase("string_concat <variable>", function(iterations) {
				repeat (iterations) {
					var _test = string_concat(a, b)
				}
			},
			function(iterations) {
				a = "a"
				b = "b"
			}),
			new TestCase("string_join <literal>", function(iterations) {
				repeat (iterations) {
					var _test = string_join("", "a", "b")
				}
			},
			function(iterations) {
				
			}),
			new TestCase("string_join <variable>", function(iterations) {
				repeat (iterations) {
					var _test = string_join(a, b)
				}
			},
			function(iterations) {
				a = "a"
				b = "b"
			}),
			new TestCase("$\"{a}{b} <literal>", function(iterations) {
				repeat (iterations) {
					var _test = $"{"a"}{"b"}"
				}
			},
			function(iterations) {
				
			}),
			new TestCase("$\"{a}{b} <variable>", function(iterations) {
				repeat (iterations) {
					var _test = $"{a}{b}"
				}
			},
			function(iterations) {
				a = "a"
				b = "b"
			}),
			new TestCase("string <literal>", function(iterations) {
				repeat (iterations) {
					var _test = string("a", "b")
				}
			},
			function(iterations) {
				
			}),
			new TestCase("string <variable>", function(iterations) {
				repeat (iterations) {
					var _test = string(a, b)
				}
			},
			function(iterations) {
				a = "a"
				b = "b"
			}),
			
		]),

@rwkay
Copy link
Author

rwkay commented Apr 30, 2024

Added in more functions - only works for constant arguments

  • dsin
  • dcos
  • dtan
  • darcsin
  • darccos
  • darctan
  • darctan2
  • abs
  • sign
  • frac
  • sqr
  • exp
  • ln
  • log2
  • log10
  • power
  • logn
  • colour_get_red, color_get_red
  • colour_get_green, color_get_green
  • colour_get_blue``color_get_blue
  • string_concat
  • string_join
  • string
  • min
  • max
  • mean
  • median
  • clamp
  • lerp

@ParodyKnaveBob
Copy link

How would the compiler handle live executions of math_set_epsilon()? Should math operations only optimize at compile time for integers to be safe?

@rwkay
Copy link
Author

rwkay commented May 1, 2024

The only math operation that is affected by math_set_epsilon is sqrt and I have avoided that one just now for this reason - the epsilon is only used during comparison operations

@stuckie stuckie added this to the 2024.6 milestone May 1, 2024
@rwkay
Copy link
Author

rwkay commented May 1, 2024

Here is an updated project with better layout and tests all the functions mentioned above -
OptimisationTests.zip

@rwkay
Copy link
Author

rwkay commented May 1, 2024

Feature added in 2024.6

The test GML code in the above project is

show_debug_message( $"make_color_rgb,      {make_color_rgb(0, 0, 0)}, {make_color_rgb(0, 1, 0)}, {make_color_rgb(255, 255, 255)}, {make_color_rgb(128, 0, 128)}" );
show_debug_message( $"string_lower/upper   {string_lower( "HELLO WORLD" )}, {string_lower( "This Is Living" )}, {string_upper( "hello world" )}, {string_upper( "this is living" )}" );
show_debug_message( $"sin                  {sin(0)}, {sin(pi / 2)}, {sin(pi)}, {sin(3*pi/2)}" );
show_debug_message( $"cos                  {cos(0)}, {cos(pi / 2)}, {cos(pi)}, {cos(3*pi/2)}" );
show_debug_message( $"tan                  {tan(0)}, {tan(pi / 2)}, {tan(pi)}, {tan(3*pi/2)}, {tan(pi*2)}" );
show_debug_message( $"arcsin               {arcsin(0)}, {arcsin(1)}, {arcsin(-1)}, {arcsin(0.707)}" );
show_debug_message( $"arccos               {arccos(0)}, {arccos(1)}, {arccos(-1)}, {arccos(0.707)}" );
show_debug_message( $"arctan               {arctan(0)}, {arctan(1)}, {arctan(-1)}, {arctan(0.707)}" );
show_debug_message( $"arctan2              {arctan2(1,1)}, {arctan2(2,2)}, {arctan2(-1,-1)}, {arctan2(1,-1)}" );
show_debug_message( $"ceil                 {ceil(0.1)}, {ceil(1.5)}, {ceil(-0.5)}, {ceil(-1.5)}" );
show_debug_message( $"floor                {floor(0.1)}, {floor(1.5)}, {floor(-0.5)}, {floor(-1.5)}" );
show_debug_message( $"degtorad             {degtorad(45)}, {degtorad(90)}, {degtorad(135)}, {degtorad(270)}" );
show_debug_message( $"radtodeg             {radtodeg(pi)}, {radtodeg(pi/2)}, {radtodeg(3*pi/2)}, {radtodeg(2*pi)}" );
show_debug_message( $"dsin                 {dsin(0)}, {dsin(90)}, {dsin(180)}, {dsin(270)}" );
show_debug_message( $"dcos                 {dcos(0)}, {dcos(90)}, {dcos(180)}, {dcos(270)}" );
show_debug_message( $"dtan                 {dtan(0)}, {dtan(90)}, {dtan(180)}, {dtan(270)}, {dtan(360)}" );
show_debug_message( $"darcsin              {darcsin(0)}, {darcsin(1)}, {darcsin(-1)}, {darcsin(0.707)}" );
show_debug_message( $"darccos              {darccos(0)}, {darccos(1)}, {darccos(-1)}, {darccos(0.707)}" );
show_debug_message( $"darctan              {darctan(0)}, {darctan(1)}, {darctan(-1)}, {darctan(0.707)}" );
show_debug_message( $"darctan2             {darctan2(1,1)}, {darctan2(2,2)}, {darctan2(-1,-1)}, {darctan2(1,-1)}" );
show_debug_message( $"abs                  {abs(10)}, {abs(-10)}, {abs(5)}, {abs(-5)}" );
show_debug_message( $"sign                 {sign(10)}, {sign(-10)}, {sign(5)}, {sign(-5)}, {sign(0)}" );
show_debug_message( $"frac                 {frac(10.5)}, {frac(-10.25)}, {frac(5.2)}, {frac(-5.3)}, {frac(0.2)}" );
show_debug_message( $"sqr                  {sqr(10)}, {sqr(-10)}, {sqr(5.2)}, {sqr(-5.3)}, {sqr(0.2)}" );
show_debug_message( $"exp                  {exp(10)}, {exp(2)}" );
show_debug_message( $"ln                   {ln(0)}, {ln(20)}, {ln(-20)}" );
show_debug_message( $"log2                 {log2(0)}, {log2(20)}, {log2(-20)}" );
show_debug_message( $"log10                {log10(0)}, {log10(20)}, {log10(-20)}" );
show_debug_message( $"power                {power(5,2)}, {power(2,3)}, {power(2,8)}" );
show_debug_message( $"logn                 {logn(10,0)}, {logn(10,20)}, {logn(10,-20)}" );
show_debug_message( $"color_get_red        {color_get_red(c_red)}, {color_get_red(c_fuchsia)}, {color_get_red(c_maroon)}, {color_get_red(c_olive)}, {color_get_red(c_orange)}" );
show_debug_message( $"color_get_green      {color_get_green(c_green)}, {color_get_green(c_fuchsia)}, {color_get_green(c_maroon)}, {color_get_green(c_olive)}, {color_get_green(c_orange)}" );
show_debug_message( $"color_get_blue       {color_get_blue(c_blue)}, {color_get_blue(c_fuchsia)}, {color_get_blue(c_maroon)}, {color_get_blue(c_olive)}, {color_get_blue(c_orange)}" );
show_debug_message( $"string_concat        {string_concat( "Hello ", "World")}, {string_concat( "This", " ", "is", " ", "Living")}" );
show_debug_message( $"string_join          {string_join( " ", "Hello", "World")}, {string_join( "-", "This", "is", "Living")}" );
show_debug_message( $"string               {string( "Hello")}, {string( "{0} {1} {2}", "This", "is", "Living")}" );
show_debug_message( $"min                  {min( 5, 10, 0, -3)}, {min( 100, 30, 10, 2)}" );
show_debug_message( $"max                  {max( 5, 10, 0, -3)}, {max( 100, 30, 10, 2)}" );
show_debug_message( $"mean                 {mean( 5, 10, 0, -3)}, {mean( 100, 30, 10, 2)}" );
show_debug_message( $"median               {median( 5, 10, 0, -3)}, {median( 100, 30, 10, 2)}" );
show_debug_message( $"clamp                {clamp( 5, 0, -3)}, {clamp( 100, 30, 10)}" );
show_debug_message( $"lerp                 {lerp( 5, 0, -3)}, {lerp( 100, 30, 10)}" );

and this now generates the VM code

00000000 : 000006c003000000         push.s    "make_color_rgb,      0, 256, 16777215, 8388736"
00000008 : 00005607                 conv.s.v
0000000c : 010002d904000000         call.i    $show_debug_message$
00000014 : 0000059e                 popz.v
00000018 : 000006c005000000         push.s    "string_lower/upper   hello world, this is living, HELLO WORLD, THIS IS LIVING"
00000020 : 00005607                 conv.s.v
00000024 : 010002d904000000         call.i    $show_debug_message$
0000002c : 0000059e                 popz.v
00000030 : 000006c006000000         push.s    "sin                  0, 1, 0.00, -1"
00000038 : 00005607                 conv.s.v
0000003c : 010002d904000000         call.i    $show_debug_message$
00000044 : 0000059e                 popz.v
00000048 : 000006c007000000         push.s    "cos                  1, 0.00, -1, -0.00"
00000050 : 00005607                 conv.s.v
00000054 : 010002d904000000         call.i    $show_debug_message$
0000005c : 0000059e                 popz.v
00000060 : 000006c008000000         push.s    "tan                  0, 16331239353195370, -0.00, 5443746451065123, -0.00"
00000068 : 00005607                 conv.s.v
0000006c : 010002d904000000         call.i    $show_debug_message$
00000074 : 0000059e                 popz.v
00000078 : 000006c009000000         push.s    "arcsin               0, 1.57, -1.57, 0.79"
00000080 : 00005607                 conv.s.v
00000084 : 010002d904000000         call.i    $show_debug_message$
0000008c : 0000059e                 popz.v
00000090 : 000006c00a000000         push.s    "arccos               1.57, 0, 3.14, 0.79"
00000098 : 00005607                 conv.s.v
0000009c : 010002d904000000         call.i    $show_debug_message$
000000a4 : 0000059e                 popz.v
000000a8 : 000006c00b000000         push.s    "arctan               0, 0.79, -0.79, 0.62"
000000b0 : 00005607                 conv.s.v
000000b4 : 010002d904000000         call.i    $show_debug_message$
000000bc : 0000059e                 popz.v
000000c0 : 000006c00c000000         push.s    "arctan2              0.79, 0.79, -2.36, 2.36"
000000c8 : 00005607                 conv.s.v
000000cc : 010002d904000000         call.i    $show_debug_message$
000000d4 : 0000059e                 popz.v
000000d8 : 000006c00d000000         push.s    "ceil                 1, 2, 0, -1"
000000e0 : 00005607                 conv.s.v
000000e4 : 010002d904000000         call.i    $show_debug_message$
000000ec : 0000059e                 popz.v
000000f0 : 000006c00e000000         push.s    "floor                0, 1, -1, -2"
000000f8 : 00005607                 conv.s.v
000000fc : 010002d904000000         call.i    $show_debug_message$
00000104 : 0000059e                 popz.v
00000108 : 000006c00f000000         push.s    "degtorad             0.79, 1.57, 2.36, 4.71"
00000110 : 00005607                 conv.s.v
00000114 : 010002d904000000         call.i    $show_debug_message$
0000011c : 0000059e                 popz.v
00000120 : 000006c010000000         push.s    "radtodeg             180, 90, 270, 360"
00000128 : 00005607                 conv.s.v
0000012c : 010002d904000000         call.i    $show_debug_message$
00000134 : 0000059e                 popz.v
00000138 : 000006c011000000         push.s    "dsin                 0, 1, 0.00, -1"
00000140 : 00005607                 conv.s.v
00000144 : 010002d904000000         call.i    $show_debug_message$
0000014c : 0000059e                 popz.v
00000150 : 000006c012000000         push.s    "dcos                 1, 0.00, -1, -0.00"
00000158 : 00005607                 conv.s.v
0000015c : 010002d904000000         call.i    $show_debug_message$
00000164 : 0000059e                 popz.v
00000168 : 000006c013000000         push.s    "dtan                 0, 16331239353195370, -0.00, 5443746451065123, -0.00"
00000170 : 00005607                 conv.s.v
00000174 : 010002d904000000         call.i    $show_debug_message$
0000017c : 0000059e                 popz.v
00000180 : 000006c014000000         push.s    "darcsin              0, 90, -90, 44.99"
00000188 : 00005607                 conv.s.v
0000018c : 010002d904000000         call.i    $show_debug_message$
00000194 : 0000059e                 popz.v
00000198 : 000006c015000000         push.s    "darccos              90, 0, 180, 45.01"
000001a0 : 00005607                 conv.s.v
000001a4 : 010002d904000000         call.i    $show_debug_message$
000001ac : 0000059e                 popz.v
000001b0 : 000006c016000000         push.s    "darctan              0, 45, -45, 35.26"
000001b8 : 00005607                 conv.s.v
000001bc : 010002d904000000         call.i    $show_debug_message$
000001c4 : 0000059e                 popz.v
000001c8 : 000006c017000000         push.s    "darctan2             45, 45, -135, 135"
000001d0 : 00005607                 conv.s.v
000001d4 : 010002d904000000         call.i    $show_debug_message$
000001dc : 0000059e                 popz.v
000001e0 : 000006c018000000         push.s    "abs                  10, 10, 5, 5"
000001e8 : 00005607                 conv.s.v
000001ec : 010002d904000000         call.i    $show_debug_message$
000001f4 : 0000059e                 popz.v
000001f8 : 000006c019000000         push.s    "sign                 1, -1, 1, -1, 0"
00000200 : 00005607                 conv.s.v
00000204 : 010002d904000000         call.i    $show_debug_message$
0000020c : 0000059e                 popz.v
00000210 : 000006c01a000000         push.s    "frac                 0.50, -0.25, 0.20, -0.30, 0.20"
00000218 : 00005607                 conv.s.v
0000021c : 010002d904000000         call.i    $show_debug_message$
00000224 : 0000059e                 popz.v
00000228 : 000006c01b000000         push.s    "sqr                  100, 100, 27.04, 28.09, 0.04"
00000230 : 00005607                 conv.s.v
00000234 : 010002d904000000         call.i    $show_debug_message$
0000023c : 0000059e                 popz.v
00000240 : 000006c01c000000         push.s    "exp                  22026.47, 7.39"
00000248 : 00005607                 conv.s.v
0000024c : 010002d904000000         call.i    $show_debug_message$
00000254 : 0000059e                 popz.v
00000258 : 000006c01d000000         push.s    "ln                   -inf, 3.00, NaN"
00000260 : 00005607                 conv.s.v
00000264 : 010002d904000000         call.i    $show_debug_message$
0000026c : 0000059e                 popz.v
00000270 : 000006c01e000000         push.s    "log2                 -inf, 4.32, NaN"
00000278 : 00005607                 conv.s.v
0000027c : 010002d904000000         call.i    $show_debug_message$
00000284 : 0000059e                 popz.v
00000288 : 000006c01f000000         push.s    "log10                -inf, 1.30, NaN"
00000290 : 00005607                 conv.s.v
00000294 : 010002d904000000         call.i    $show_debug_message$
0000029c : 0000059e                 popz.v
000002a0 : 000006c020000000         push.s    "power                25, 8, 256"
000002a8 : 00005607                 conv.s.v
000002ac : 010002d904000000         call.i    $show_debug_message$
000002b4 : 0000059e                 popz.v
000002b8 : 000006c021000000         push.s    "logn                 -inf, 1.30, NaN"
000002c0 : 00005607                 conv.s.v
000002c4 : 010002d904000000         call.i    $show_debug_message$
000002cc : 0000059e                 popz.v
000002d0 : 000006c022000000         push.s    "color_get_red        255, 255, 128, 128, 255"
000002d8 : 00005607                 conv.s.v
000002dc : 010002d904000000         call.i    $show_debug_message$
000002e4 : 0000059e                 popz.v
000002e8 : 000006c023000000         push.s    "color_get_green      128, 0, 0, 128, 160"
000002f0 : 00005607                 conv.s.v
000002f4 : 010002d904000000         call.i    $show_debug_message$
000002fc : 0000059e                 popz.v
00000300 : 000006c024000000         push.s    "color_get_blue       255, 255, 0, 0, 64"
00000308 : 00005607                 conv.s.v
0000030c : 010002d904000000         call.i    $show_debug_message$
00000314 : 0000059e                 popz.v
00000318 : 000006c025000000         push.s    "string_concat        Hello World, This is Living"
00000320 : 00005607                 conv.s.v
00000324 : 010002d904000000         call.i    $show_debug_message$
0000032c : 0000059e                 popz.v
00000330 : 000006c026000000         push.s    "string_join          Hello World, This-is-Living"
00000338 : 00005607                 conv.s.v
0000033c : 010002d904000000         call.i    $show_debug_message$
00000344 : 0000059e                 popz.v
00000348 : 000006c027000000         push.s    "string               Hello, This is Living"
00000350 : 00005607                 conv.s.v
00000354 : 010002d904000000         call.i    $show_debug_message$
0000035c : 0000059e                 popz.v
00000360 : 000006c028000000         push.s    "min                  -3, 2"
00000368 : 00005607                 conv.s.v
0000036c : 010002d904000000         call.i    $show_debug_message$
00000374 : 0000059e                 popz.v
00000378 : 000006c029000000         push.s    "max                  10, 100"
00000380 : 00005607                 conv.s.v
00000384 : 010002d904000000         call.i    $show_debug_message$
0000038c : 0000059e                 popz.v
00000390 : 000006c02a000000         push.s    "mean                 3, 35.50"
00000398 : 00005607                 conv.s.v
0000039c : 010002d904000000         call.i    $show_debug_message$
000003a4 : 0000059e                 popz.v
000003a8 : 000006c02b000000         push.s    "median               5, 30"
000003b0 : 00005607                 conv.s.v
000003b4 : 010002d904000000         call.i    $show_debug_message$
000003bc : 0000059e                 popz.v
000003c0 : 000006c02c000000         push.s    "clamp                -3, 10"
000003c8 : 00005607                 conv.s.v
000003cc : 010002d904000000         call.i    $show_debug_message$
000003d4 : 0000059e                 popz.v
000003d8 : 000006c02d000000         push.s    "lerp                 20, -600"
000003e0 : 00005607                 conv.s.v
000003e4 : 010002d904000000         call.i    $show_debug_message$
000003ec : 0000059e                 popz.v

The only function calls that remain are the show_debug_message call itself, everything else becomes a constant.

@rwkay rwkay closed this as completed May 1, 2024
@tinkerer-red
Copy link

tinkerer-red commented May 3, 2024

I would imagine this recursive? For instance abs(ceil(floor(sin(cos(tan(1)))))) would all eventually compile down into a single number, right?

@rwkay
Copy link
Author

rwkay commented May 3, 2024

I would imagine this recursive? For instance abs(ceil(floor(sin(cos(tan(1)))))) would all eventually compile down into a single number, right?

yes it is and does collapse down... above the functions are optimised and become constant and because of that all the string calls generated by the $"" literal collapse into constants and then the whole things become a constant and is just passed to show_debug_message

NOTE: Currently this only works for functions where every argument is a constant.. I am going to take a look at doing it for partially constant arguments for certain functions like string so that if some arguments are constant then the runtime side could be speeded up.

@tinkerer-red
Copy link

It may be worth considering also optimizing single assigned local variables. as a local variable, there is no way to go about struct_set(self, <arbitrary name>). At least for temporary variables such as:

var foo = "bar"
show_debug_message(foo)

Its obvious that there is only ever one assignment operation, and given it's a constant, it would be safe to replace all uses of foo directly with "bar". obviously though, there is a lot to consider with an optimization like this, for instance issues if local variables are ever able to be called of collected in the future as a struct, or referenced in some way.

It would honestly be more beneficial for config variables in an objects create event, but reasonably so that's not viable, short of making something like a local macro system, but that might just overcomplicate things.

@gurpreetsinghmatharoo gurpreetsinghmatharoo added the documentation Improvements or additions to documentation are required by this issue label May 6, 2024
@YYBartT YYBartT self-assigned this May 8, 2024
@rwkay
Copy link
Author

rwkay commented May 15, 2024

I have also added some more optimisation so partial constant strings passed to some of the string functions will be further optimised like so

string

when being used with formatting any constant arguments are inlined into the main string and then the parameters are reordered i.e.

string( "{0} {1} {2}", "a", "=", a );

becomes

string( "a = {0}", a );

string_concat

Constant strings are concatenated by the compiler so

string_concat( "the ", "answer ", "is ", string(a) ) ;

becomes

string_concat( "the answer is ", string(a) ) ;

string_join

Constant string arguments are joined by the compiler so

string_join( " ", "Hello", "World", string(a), "is", "the", "answer" );

becomes

string_join( " ", "Hello World", string(a), "is the answer" );

YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue May 17, 2024
…etc.)

YoYoGames/GameMaker-Bugs#5688

* Added a new page "Compiler Optimisations" under "Runner Details"
* Linked to the page from the "Compiling" page
* Updated old links to Help Center on YoYo Compiler page
@YYBartT
Copy link

YYBartT commented May 17, 2024

Documented all compiler optimisations on a new manual page "Compiler Optimisations" under the "Runner Details" section.

YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue May 20, 2024
…etc.)

YoYoGames/GameMaker-Bugs#5688

* Removed the note on the buffer_sizeof page, since it's now listed under Compiling Optimisations
YYBartT added a commit to YoYoGames/GameMaker-Manual that referenced this issue May 22, 2024
YoYoGames/GameMaker-Bugs#5688

* Referred to the rule for deterministic functions in the sentence preceding the function list
@tinkerer-red
Copy link

@YYBartT Is that available publicly yet? I'd love to peek at the changes the runner makes.

@YYBartT
Copy link

YYBartT commented May 26, 2024

@tinkerer-red It's in the beta manual here: Compiler Optimisations. (not everything's been documented in the beta manual yet though, this is)

@YYDan YYDan changed the title Add more optimisations for functions with constants within the compiler Building Projects: Optimise various make_colour...(), string...(), and maths functions which have constant arguments during the compiler phase Jun 26, 2024
@mgeddesGM
Copy link

verified in window, html5 and operagx as of IDE v2024.6.0.156 Runtime v2024.6.0.205

@mgeddesGM
Copy link

and on mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation are required by this issue feature request New feature (or a request for one)
Projects
Status: Verified
Development

No branches or pull requests

7 participants