Speed of FreeBasic

For other topics related to the FreeBASIC project or its community.
OSchmidt
Posts: 49
Joined: Jan 01, 2016 12:27
Contact:

Re: Speed of FreeBasic

Postby OSchmidt » Nov 12, 2018 18:00

A bit late to the party - just my $0.02 regarding the "speed-test"...

IMO SpeedTests should be described only with regards to their Input-values and the expected Result(s)...
leaving the implementation-language free to choose anything suitable, to produce the result (either elegantly, speedy - or both)...

That said, here's a simple VBScript-implementation for the problem (easy to translate into basically any Basic-Dialect):

Code: Select all

MsgBox FindSolutionFor("LWK3724")

Function FindSolutionFor(S)
  FindSolutionFor = (26 ^ 2 * (Asc(Mid(S, 1, 1)) - 65) _
                   + 26 ^ 1 * (Asc(Mid(S, 2, 1)) - 65) _
                   + 26 ^ 0 * (Asc(Mid(S, 3, 1)) - 65)) _
                   * 10000 + Mid(S, 4, 4) + 1
End Function


Olaf
jj2007
Posts: 1135
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Speed of FreeBasic

Postby jj2007 » Nov 12, 2018 20:09

Which part of the very incomplete list below does your speed test cover?
jj2007 wrote:But before doing all that, it would be a good idea to agree on a testbed that simulates some relevant common tasks, like:
- calculations of all sorts, integers vs floats etc
- string generation, concatenation
- string parsing
- file loading and storing
- sorting
- filtering
...
OSchmidt
Posts: 49
Joined: Jan 01, 2016 12:27
Contact:

Re: Speed of FreeBasic

Postby OSchmidt » Nov 13, 2018 3:08

jj2007 wrote:Which part of the very incomplete list below does your speed test cover?

Since no further reference was given - the last one discussed obviously...
(which also seems to be the only one, which made "demands" regarding the "how to go about it",
which is kinda uncommon for speed-tests, which aim to compare implementations in different languages).

Well, here's a search link for you, using the "Input-Value" of my prior post ("LWK3724"):
search.php?keywords=LWK3724&t=26516

Olaf

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests