The MASM Forum

General => The Soap Box => Topic started by: jj2007 on September 12, 2020, 07:28:29 PM

Title: FreeBasic Insert string into array
Post by: jj2007 on September 12, 2020, 07:28:29 PM
Comparing MasmBasic's Insert (http://www.jj2007.eu/MasmBasicQuickReference.htm#Mb1134) and Delete (http://www.jj2007.eu/MasmBasicQuickReference.htm#Mb1135) against the respective FB macros written by fxm (https://www.freebasic.net/forum/viewtopic.php?t=27606#p260732): elementInsert(array, index, element) and elementDelete(array, index) are only marginally slower than Insert array(), index [, elements] :thumbsup:

Code: [Select]
Loading array: 4599 elements loaded in loaded in 393 microseconds
inserting and deleting took 952 milliseconds
Code: [Select]
Loading array:  4599 elements loaded in  3 milliseconds
inserting and deleting took 1297 milliseconds

Attached are sources and executables. The file inc\glib.bi is required, so extract the executables to the folder where fbc.exe sits.

Note that the Gcc version produces entirely different results - something is wrong there...