Releases: monkey0506/ags-module-stack
v2.0
The biggest news is that this version of the module is fast because I can use dynamic arrays in structs now. The current limitations on managed structs led me to some suboptimal code when working with String
s, but I can pretty consistently push one million int
s (the current max size for a dynamic array btw) into a Stack
in a single for
loop in only about 30 seconds! By way of comparison, with v1.3 I tried pushing a measly ten thousand int
s into a Stack
and the program froze for more than half an hour before I force-closed it with Task Manager. I can push ten thousand int
s with this version in under a second.
To really optimize the speed, I made it possible to set the capacity of a Stack
(setting the size of the underlying dynamic array) and avoid additional copying. Considering how much unnecessary copying was taking place in v1.3 of this module, anyone who actually used the older module should be quite happy with the improvements I've made.
v1.3
v1.3 is more bug fixing. Specifically String.Format
has a limit on the length of the returned String
, so where applicable I've replaced it with instances of String.Append
(which has no limit). Further I modified the way that stack objects get pushed in to make it more secure. Previously if you pushed the same stack copy onto a stack multiple times it could potentially corrupt the internal data structure. This version completely resolves that possibility.
v1.2
v1.2 of the module includes:
- The new functions
Stack.GetItemsArray
,File.WriteStack
,File.ReadStackBack
, andStack.LoadFromFile
. - Improved formatting of
Stack.Copy
to further prevent fatal error-inducing collisions. - Bug fix for
Stack.Push
where if you were specifying an index theItemCount
was still getting increased. - Adds the data type
eStackDataInvalid
to denote when the data stored is not validStackData
.
v1.0
Initial release of the module.
v1.2a
v1.2a is just a quick bug fix. Stack.GetItemsArray
would request a zero-sized array which AGS doesn't like for some reason so I just put a quick check to prevent that.