That’s basically it. only I don not need the wrapper anymore, i go directly to word:=OB Get(<>Dict;$t_MyKey;is Text) Using arrays I sorted the key array and used my own optimized array query routine (same as the new Find in sorted array introduced in V16). With object, no need to sort, the object system optimizes it by itself. Only no need to calculate as my dictionary table is quite simple:
WordKey Language Word so I queried for the language I needed and then apply to selection([dict];ob set(<>Dict;[dict]WordKey;[dict]Word) ready set go could not be conceivably easier cheers > Am 17.07.2017 um 16:45 schrieb Peter Jakobsson via 4D_Tech > <4d_tech@lists.4d.com>: > > Thanks Alexander. > > Which style of implementation did you use ? Did you use the old array lookup > key as the new object key in the key/value pair ? i.e. did you enumerate the > keys like this: ? > > ======= OLD WAY ======= > > ARRAY LONGINT(vArrKeysID; 1000) > ARRAY LONGINT(vArrKeysNames; 1000) > > $x:=Find in Array(vArrKeysID;345) > > If($x>0) > $0:= vArrKeysNames{$x} > End if > > ======= NEW WAY ======= > > C_OBJECT($myOBJECT) > > For($i;1;1000) > > $key:=String($i) > $value:=$i > OB SET($myOBJECT;$key;$value) > > End For > > …then for finding (passing the ID in $1: > > $key:=string($1) > > $0:=ob get($myOBJECT;$key) > > ====================== > > Is that how you did it ? (i.e. with calculated/hashed keys). > > Peter > > > On 17 Jul 2017, at 13:17, Herr Alexander Heintz via 4D_Tech > <4d_tech@lists.4d.com> wrote: > >> Using objects was MAGNITUDES faster than synchronised arrays > > ********************************************************************** > 4D Internet Users Group (4D iNUG) > FAQ: http://lists.4d.com/faqnug.html > Archive: http://lists.4d.com/archives.html > Options: http://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ********************************************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************