Search found 10 matches
- Jun 15, 2018 14:54
- Forum: Community Discussion
- Topic: Speed of FreeBasic
- Replies: 62
- Views: 7082
Re: Speed of FreeBasic
I've now added C++, using C++ strings. As expected, it is somewhat slower: ⋅ C using switch and cast: gcc -Ofast: 0.86 seconds ⋅ C using ifs, no cast: gcc -Ofast: 1.43 seconds ⋅ C++ using strings, ifs, no casting: g++ -Ofast: 4.25 seconds ⋅ QB64 v1.1: qb64 -x:...
- Jun 15, 2018 14:33
- Forum: Community Discussion
- Topic: Speed of FreeBasic
- Replies: 62
- Views: 7082
Re: Speed of FreeBasic
Hi friends, You might be interested. I made a simple algorithm, intentionally brute force with CASE. ... Interesting. I did my own integer-intensive benchmarks a while back. See here: https://www.freebasic.net/forum/viewtopic.php?f=17&t=23489 For your test, I get very different results on my ma...
- Oct 26, 2016 11:31
- Forum: Community Discussion
- Topic: Rosetta code: help needed
- Replies: 3
- Views: 635
Rosetta code: help needed
I've created some (fun!) tasks over at Rosettacode: http://rosettacode.org/wiki/Compiler/lexical_analyzer http://rosettacode.org/wiki/Compiler/syntax_analyzer http://rosettacode.org/wiki/Compiler/code_generator http://rosettacode.org/wiki/Compiler/virtual_machine_interpreter http://rosettacode.org/w...
- Feb 26, 2016 3:30
- Forum: General
- Topic: How to (better) initialize a UDT
- Replies: 3
- Views: 316
Re: How to (better) initialize a UDT
fxm wrote:UDT direct initializing with strings is not supported at this time, therefore a constructor must be defined.
....
That worked _really_ well! Thank you!
- Feb 24, 2016 12:43
- Forum: General
- Topic: How to (better) initialize a UDT
- Replies: 3
- Views: 316
How to (better) initialize a UDT
How to (better) initialize the Atr_s UDT below? Given: enum Token_type tk_eoi tk_if ... tk_variable end enum type Atr_s tok as Token_type text as string right_associative as boolean is_binary as boolean is_unary as boolean precedence as integer end type dim shared atr(tk_eoi to tk_variable) as Atr_s...
- Jul 09, 2015 18:42
- Forum: Windows
- Topic: In-Memory Dialogs
- Replies: 71
- Views: 56429
Re: In-Memory Dialogs
The problem is not with the version, but with the change to 64-bit code. Correcting the problem required only a small modification, new version in first post, but note that I had only a limited time to test. I should have anticipated this problem and corrected it years ago. Thanks for the quick res...
- Jul 09, 2015 11:44
- Forum: Windows
- Topic: In-Memory Dialogs
- Replies: 71
- Views: 56429
Re: In-Memory Dialogs
Has anyone gotten dialogs.bas to work with later versions of FreeBASIC? With fbc 1.02.1 I get: FreeBASIC Compiler - Version 1.02.1 (04-25-2015), built for win64 (64bit) Copyright (C) 2004-2015 The FreeBASIC development team. standalone c:\bin\bas\fb\Dialogs>..\fbc ex1.bas c:\...
- Apr 18, 2015 10:04
- Forum: Community Discussion
- Topic: integer operations benchmark (or interpreter killer)
- Replies: 11
- Views: 2293
Re: integer operations benchmark (or interpreter killer)
fxm wrote:For FreeBASIC version:
- As you are using Windows 64-bit, I think that INTEGER defines a 64 bits integer number.
- Can you test it by using everywhere LONG (32 bits) instead of INTEGER?
1.37 seconds.
Interesting. I thought it would have been much closer to the 1.09 seconds of the INTEGER version.
- Apr 18, 2015 2:40
- Forum: Community Discussion
- Topic: integer operations benchmark (or interpreter killer)
- Replies: 11
- Views: 2293
integer operations benchmark (or interpreter killer)
Here is the code in FreeBasic for an ASCII Mandelbrot, using integers only. dim as integer left_edge = -420 dim as integer right_edge = 300 dim as integer top_edge = 300 dim as integer bottom_edge = -300 dim as integer x_step = 7 dim as integer y_step = 15 dim as integer max_iter = 200 dim as intege...
- Jul 29, 2008 11:55
- Forum: Beginners
- Topic: Converting program from QBasic to FreeBasic help
- Replies: 3
- Views: 1588
Converting program from QBasic to FreeBasic help
I'm converting some (working) code from QBasic, and have a question: This works: if 1 then print "? " else print "2" But these generate syntax errors: if 1 then print "? ", else print "2" if 1 then print "? "; else print "2" fbc -lang qb te...