pidd wrote: ↑Dec 27, 2022 4:14I was hugely disappointed that php7.4 was a long way out the running at around 8 times slower than fbc, I haven't profiled to find out why but my php is set up for development which would add unnecessary overhead. I suspect php8.2 would perform considerably better but I haven't got php8 loaded up anywhere yet.
And yet PHP is probably 8 times faster than FB at developing and running web sites! And PHP would scale way better than FB ever would, largely because of the way the infrastructure works, despite its interpreted nature. CGI (which is what FB is limited to) is seriously slow for web apps.
Benchmarks like this one are of extremely limited use.
Pure (not fast-) CGIs are only interesting because they are the simplest native form of webserver<-> application communication. In reality you always use some fastcgi, isapi or mod_cgi thingy.
I did ISAPI dll frameworks in Delphi almost two decades ago, and it ran circles around PHP
The core advantage of an interpreter solution is live editing of everything, not speed.
dodicat wrote: ↑Dec 28, 2022 14:41
I read somewhere that Microsoft included qbasic (interpreted quickbasic) in their earlier versions (DOS, win 95/98/me up to but excluding win 2000) because people would have to purchase quickbasic if they wanted a compiler.
So it was a cash driven idea.
The compilation was pretty pointless, programs ran no faster whether they were compiled or "interpreted", however there was extra functionality in the IDE which made development easier. I still rate the IDE as one of the best I have come across, simple but highly functional. Some modern IDE's waste my time fighting against them, I have a rubbish memory so things need to be simple.
I used to think that also, but I was incorrect. QB had two ways of making the EXE. One was the threaded p-code with bundled interpreter and the other was the "stand-alone exe file" which apparently was a real compilation that made code as a fast as any compiler at the time. I just fired up QB45 and sure enough, there are two options when making the exe. I vaguely remember knowing this in the past but certainly had forgotten.
I agree the IDE was amazing. Even by today's standards it is still pretty good. Especially how it lets you explore the program's structure with the sub/function browser, and how it keeps them all separate. And when you're typing source code, it compiles on the fly so you can tell if you've typed in "good" code because it automatically capitalizes the keywords. Only missing syntax coloring! I obviously have a soft spot for QB.
#include "gsl/gsl_matrix.bi"
#include "gsl/gsl_linalg.bi"
#include "gsl/gsl_blas.bi"
Dim StartTime As Double, EndTime as Double
Dim As gsl_matrix Ptr A = gsl_matrix_alloc(1024, 1024)
Dim As gsl_matrix Ptr B = gsl_matrix_alloc(1024, 1024)
Dim As gsl_matrix Ptr C = gsl_matrix_alloc(1024, 1024)
For i As Integer = 0 To 1023
For j As Integer = 0 To 1023
gsl_matrix_set (A, i, j, rnd)
gsl_matrix_set (B, i, j, rnd)
Next
next
print("FreeBasic Matrix Multiplication Benchmark started. Please wait...")
StartTime = Timer
'gsl_linalg_matmult(A,B,C)
gsl_blas_dgemm(CblasNoTrans, CblasNoTrans, 1.0, B, A, 0.0, C)
EndTime = Timer
print("Free Basic Matrix Multiplication Benchmark finished in: " & (EndTime-StartTime) & " seconds")
Sleep
What operating system? You need the GSL shared libraries installed or downloaded. They are not part of FreeBASIC.
If on Windows, are you doing 64-bit or 32-bit FreeBASIC? I have dlls for both 32 and 64-bit windows that are known to be good; they are part of my Fedora Linux distribution stock packages, part of the cross compiling tools. I can post a zip of them. I think there are good links on the forum here too somewhere.
caseih wrote: ↑Aug 24, 2023 22:11
What operating system? You need the GSL shared libraries installed or downloaded. They are not part of FreeBASIC.
If on Windows, are you doing 64-bit or 32-bit FreeBASIC? I have dlls for both 32 and 64-bit windows that are known to be good; they are part of my Fedora Linux distribution stock packages, part of the cross compiling tools. I can post a zip of them. I think there are good links on the forum here too somewhere.
Windows 11, 64-bit FreeBASIC. I would welcome the dll's.
sorry for the lousy help, please re-download again and after unpacking, place the *.dll.a files into the FB win64 lib folder
the dlls need to be where your program is located or somewhere on the Windows PATH
[ frankly, I got used to not getting any response from my posts so I don't check the forum very often ]
srvaldez wrote: ↑Aug 25, 2023 17:09
sorry for the lousy help, please re-download again and after unpacking, place the *.dll.a files into the FB win64 lib folder
the dlls need to be where your program is located or somewhere on the Windows PATH
[ frankly, I got used to not getting any response from my posts so I don't check the forum very often ]