Hey John! Glad to see you're still digging into details.
C_OBJECT is great, I use it all the time. It's always nice to have more
choices in 4D. (You know more languages than most people, so you
doubtlessly were already missing something like C_OBJECT.) I posted speed
numbers a few days ago with so
he bigger will be the array, the more
> efficient will be associative arrays compared with classic parsing of arrays.
>
> My very best,
>
> JPR
>
>
>
>> Message: 7
>> Date: Mon, 17 Jul 2017 11:43:12 -0700
>> From: Justin Leavens
>> To: 4D iNug
On 20 Jul 2017, at 11:39, JPR via 4D_Tech <4d_tech@lists.4d.com> wrote:
> In case of an object, the properties are 'indexed' by using an internal Hash
> table, so the access to one particular Property doesn't need a sequential
> parsing of the list of values, but an almost direct access. I conf
gt; To: 4D iNug Technical <4d_tech@lists.4d.com>
> Subject: Re: Arrays vs Object for Key/Value pair lookups
> Message-ID:
>
> Content-Type: text/plain; charset="UTF-8"
>
> I did a 2014 Summit presentation (5 JSON Tips) which should be available
> for down
Case sensitive comparison support in Find in array/Find in sorted array is long
overdue. Even best, supported in string compariosn operator (or new operator
for string)
$true:=($string1=*$string2)
$true:=($string1>*$string2)
$true:=($string1<*$string2)
Alan Chan
4D iNug Technical <4d_tech@list
> "Find" commands accept wild cards and evaluate using collation algorithms
(case-insensitive comparison plus some
> other locale specific rules) is it really fair to compare the two
against object keys?
I'm not sure what "fair" means here, but it's definitely not a
apples-to-apples comparison. F
the "Find" commands accept wild cards and evaluate using collation algorithms
(case-insensitive comparison plus some other locale specific rules)
is it really fair to compare the two against object keys?
> 2017/07/18 9:44、David Adams via 4D_Tech <4d_tech@lists.4d.com> のメール:
>
> * Sequential Find
Hello all, I've been interested in this topic for some time but have never
taken the time to run any tests. I don't have the time now (for sure), but
I took some anyway. What I did was grab a huge unique word file, clear out
words that are obviously illegal JSON key names and tried doing lookups
th
I did a 2014 Summit presentation (5 JSON Tips) which should be available
for download that demonstrated the benefits of using objects for key/value
pair cache lookups, but in the end it’s pretty easy to demonstrate. The
benefits start to show up with a few hundred keys, but at 100,000 it’s
easily 2
On 17 Jul 2017, at 17:03, Herr Alexander Heintz via 4D_Tech
<4d_tech@lists.4d.com> wrote:
> so I queried for the language I needed and then
> apply to selection([dict];ob set(<>Dict;[dict]WordKey;[dict]Word)
Ah !
So you just ‘hoover up’ into your dictionary object.
Like a hoover ?
Peter
***
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
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
Take a look at the new
http://livedoc.4d.com/4D-Language-Reference-15.4/Arrays/Find-in-sorted-array.301-3274895.en.html.
This would change the FIA side of the equation.
Keith - CDI
> On Jul 17, 2017, at 5:46 AM, Peter Jakobsson via 4D_Tech
> <4d_tech@lists.4d.com> wrote:
>
> Hi
>
> I rememb
Interesting subject.
Just to make sure I am able to interpret the the findings correctly, were
you comparing Find in array with object find, or *binary* find in array on
a sorted array? Binary search is very hard (but certainly not impossible)
to compete with. If you have an array of 1,000,000 ele
I did a lot of testing for this as I need to keep a dictionary of words
identified by word IDs with some 300 000 items around.
I need to retrieve the words based on their ID.
Using objects was MAGNITUDES faster than synchronised arrays (Cannot find the
number anymore but we are talking measurable
Hi
I remember at last year’s summit, JPR was emphasising how objects were far more
optimised than arrays for doing lookups over large numbers of key value pairs.
e.g. we usually do this:
$x:=find in array(myKEYS;”product_code_x”)
if($x>0)
$0:=myPRICES{$x}
end if
How do people prefer to do t
16 matches
Mail list logo