SimplePHPEasyPlus icon indicating copy to clipboard operation
SimplePHPEasyPlus copied to clipboard

Use more memory efficient method of storing numbers

Open KorvinSzanto opened this issue 12 years ago • 6 comments

SplObjectStorage is better suited for what we're trying to do in NumberCollection.

KorvinSzanto avatar Mar 08 '13 20:03 KorvinSzanto

Agreed. Anything that smells of proceduralness should be removed immediately. I'm looking at you arrays.

mikeytag avatar Mar 08 '13 21:03 mikeytag

Why don't we store the values within a Java Bean. Then we can persist them to a database and get all sorts of delicious metrics.

Also, is this threadsafe?

ultimape avatar Apr 26 '13 12:04 ultimape

Why not just use a hashing algorithm to store the numbers in a map, keyed by string index?

an-empty-string avatar May 20 '14 15:05 an-empty-string

I would recommend a hash key generator then

gquemener avatar May 20 '14 15:05 gquemener

Its becoming clear that we need to rearchitect the way we handle number collections. On May 20, 2014 8:49 AM, "Gildas Quéméner" [email protected] wrote:

I would recommend a hash key generator then

— Reply to this email directly or view it on GitHubhttps://github.com/Herzult/SimplePHPEasyPlus/pull/6#issuecomment-43644265 .

KorvinSzanto avatar May 20 '14 15:05 KorvinSzanto

I'm thinking, that instead of a hash generator, perhaps we should architect our own NumberLinkedListNode class, and then use a doubly-linked circular linked list. This maximizes the efficiency of number operations while allowing us to effectively use the object-oriented paradigm. Thoughts?

an-empty-string avatar May 21 '14 21:05 an-empty-string