News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Bug in Boyer-Moore BM.asm ?

Started by Rav, May 07, 2022, 06:13:41 AM

Previous topic - Next topic

HSE

Quote from: mineiro on August 14, 2023, 08:16:00 AMVersion below search for a 1024 random bytes inside a ~100MB random bytes.
As you can guess, string search will fail into this testcase.

That is a horrible test  :biggrin: In a test you must remove "luck".

:thumbsup: but enjoy your game.

Equations in Assembly: SmplMath

mineiro

Quote from: HSE on August 14, 2023, 08:25:28 AMThat is a horrible test  :biggrin: In a test you must remove "luck".
:thumbsup: but enjoy your game.
Yes, maybe instead of using GlobalAlloc use VirtualAlloc ... . So no hidden zeros can appear, and page fauls can appear into some SSE string search functions.

Note: I forgot to remove/comment GlobalFree inside BinSearch function, please, in previous example, comment that line.

Just for sure, I'm attaching a version without that line.
I'd rather be this ambulant metamorphosis than to have that old opinion about everything