View Single Post
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 08-26-2015 , 23:57   Re: Dynamic Objects and Properties
Reply With Quote #4

I've made a second version.

The main idea was to try and speed up Create/Update member operations.

The internal data for each object is one array, rather than 3 arrays (one for each type (int, float, string)).

The member name is also contained in the data, where as the first version has a lookup array that points to the members position in the data array (1 per type again).

Code:
[SM] Starting Benchmark Tests...
Created 1000 dynamic object(s) in 0.000000 second(s)
Created 99000 dynamic member(s) in 2.285156 second(s)
CRASHED FOR TAKING TO LONG LOL
The benchmarks are considerably slower in this version. I think this is because the lookups per type in the first version are not looping the whole member set on each request.

I also believe lots of the internal functions are passing around arguments that could be static.

Version 002 is attached to this post.

If anyone has any idea's or suggestions on how to go about making this as optimised as possible, I'm all ears!
Attached Files
File Type: zip dynamic-002.zip (16.7 KB, 507 views)
__________________

Last edited by Neuro Toxin; 08-28-2015 at 04:18.
Neuro Toxin is offline