Author Topic: FreeBasic Insert string into array  (Read 145 times)

jj2007

  • Member
  • *****
  • Posts: 10671
  • Assembler is fun ;-)
    • MasmBasic
FreeBasic Insert string into array
« on: September 12, 2020, 07:28:29 PM »
Comparing MasmBasic's Insert and Delete against the respective FB macros written by fxm: 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...
« Last Edit: September 12, 2020, 10:02:53 PM by jj2007 »