The "problem" of using/not using * is knowing whether it is helpful.

If I am looking for all instances of 'e' in the text of a book I can 
NOT use * as e ≠ E ≠ ë etc.
So... either I would need to do repeated loops through the text using 
variations of 'e' (e, E, ë, etc), or I can not use *.

If all we are doing is talking about "how fast is this" then this 
discussion has no relation to real world usage. 

Knowing that it take nearly 20 times as long for position to find a 
character without * is important information, as is knowing that your 
test(s) always used *.

In your example, 4 million characters, 100,000 instances without * 
should be (14 * 20) = ~280ms, assuming that position does not slow down 
even further on multiple instances. While 280 ms is not long, if you 
need to loop over this 100 times it shows to your UI.

14ms * 100 = 1400ms = 1.4 sec  -- user *might* notice
280ms * 100 = 28000 = 28 seconds -- user has powered off the system and 
is restarting thinking the machine froze.  :)

so.. like I said, knowing this is important.



On Sun, 07 May 2017 03:54:22 +0800, Alan Chan via 4D_Tech wrote:
> Hi Chip
> 
> We have been talking about * all along. Without * has never been in my test.
> 
> My test always consider total length of text "and" total count of 
> occurrence. My test is for 4,300,000 length text and 100,000 
> occurrence. It took 14ms on my machine.
> 
> Alan Chan
> 
> 4D iNug Technical <4d_tech@lists.4d.com> writes:
>> v13 testing
>> position - no * find character (u + umlaut) end of 2,000,000 length text
>> 56ms +/- ms
>> 
>> Position (*) - find same character at end of 2,000,000 length text
>> 3 ms +/- 1ms
>> 
>> so... when you know that diacritcallity, or capitalization, is 
>> important Position with * is MUCH faster -- at least in v13
> 
> **********************************************************************
> 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
> **********************************************************************
---------------
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**********************************************************************
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
**********************************************************************

Reply via email to