vdweller
Member
Hi all!
I happened to stumble on a rather interesting find. I am working on a project where execution speed is of paramount importance, so I decided to go back in some places in my code and replace certain fixed-size lists with arrays.
During this process, I got some errors and, long story short, I found out that if you write:
This produces the correct result in VM (0) but in YYC the key isn't deleted.
Does anyone have a technical explanation on why this doesn't work on YYC? Even if arrays are pointers, they have some numeric form and in theory could be used as map keys, right?
PS I know there are a couple other related threads, but they either pertain to 1.4 or don't touch upon the issue from a technical standpoint, they're more like what other things to do to avoid this (which I'm already aware of).
I happened to stumble on a rather interesting find. I am working on a project where execution speed is of paramount importance, so I decided to go back in some places in my code and replace certain fixed-size lists with arrays.
During this process, I got some errors and, long story short, I found out that if you write:
Code:
var a=array_create(6);
var m=ds_map_create();
m[?a]=1;
var s=ds_map_find_first(m);
ds_map_delete(m,s);
print(ds_map_size(m));
Does anyone have a technical explanation on why this doesn't work on YYC? Even if arrays are pointers, they have some numeric form and in theory could be used as map keys, right?
PS I know there are a couple other related threads, but they either pertain to 1.4 or don't touch upon the issue from a technical standpoint, they're more like what other things to do to avoid this (which I'm already aware of).