QB64 Phoenix Edition
Speed comparison of MID$ vs ASC - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: Official Links (https://qb64phoenix.com/forum/forumdisplay.php?fid=16)
+--- Forum: Learning Resources and Archives (https://qb64phoenix.com/forum/forumdisplay.php?fid=13)
+--- Thread: Speed comparison of MID$ vs ASC (/showthread.php?tid=2116)

Pages: 1 2


RE: Speed comparison of MID$ vs ASC - SpriggsySpriggs - 11-03-2023

One must also consider that you don't generally need to replace 100 million characters at any given time. So using MID$ in most cases will be completely fine. Without even needing to run any tests, there are definitely diminishing returns as the strings become smaller. Replacing a single character using MID$ vs using ASC will not be noticeable to anyone except the CPU. Kind of like when Steve used to do a huge recursive file listing using his direntry stuff and PowerShell could do it much quicker and automatically sorted. On larger listings, PowerShell always won. On smaller listings, direntry won. All cool ideas, but these speed tests are never realistic.