× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Sam,

Am 16.02.2024 um 18:00 schrieb Sam_L <lennon_s_j@xxxxxxxxxxx>:

Granted, it is most likely an extreme edge case to load this many records. I was creating a program to create large amounts of test data for a performance test, and wanted realistic city/state/zip data. It was a chance to experiment with random numbers and variable length arrays and I wanted to see the impact of re-allocating memory as the array increased vs trying to allocate enough memory once. My take is that unless you are loading the array many times it makes little observable difference.

It would be nice to test against doing the "heavy lifting" in the database by JOIN, window functions and RANDOM().

From my experience - the performance gain from doing something in memory against doing something (properly) in the database is often negligible.

The only time when I had a case of such a thing it was some sort of a state-machine / rule-processor which had to compare against a lot of "lists" of items. This was awfully slow in SQL and native IO - so I wrote some cache with dynamic memory allocation - and had real great performance increase by factor 20 and better - but this was "once in a lifetime" - and also a real edge case.

Kind regards,
Daniel

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.