Search found 1134 matches

by jj2007
Mar 11, 2019 9:04
Forum: General
Topic: Squares
Replies: 6658
Views: 376717

Re: Squares

If instr() takes several minutes, then you have a serious design problem. Can you post your code?

Code: Select all

93 ms for finding 195400 occurrences of 'Jesus' in a 777 MB file composed of 200x 'bible.txt'
by jj2007
Mar 10, 2019 19:48
Forum: General
Topic: Squares
Replies: 6658
Views: 376717

Re: Squares

You forgot the Dodicat and Google cheatam's algorithm, now known as DaG-ca beta (an idea from badidea) Excellent! 0.106 seconds 50599 DaG-ca beta 0.096 seconds 50599 PopCount asm 0.142 seconds 50599 PopCount FB 0.097 seconds 50599 DaG-ca beta 0.093 seconds 50599 PopCount asm 0.141 seconds 50599 Pop...
by jj2007
Mar 10, 2019 15:03
Forum: General
Topic: Squares
Replies: 6658
Views: 376717

Re: Squares

A table-based solution is fastest: 31 ms for popcounting a total of 159997056 bits 31 ms for popcounting a total of 159982282 bits 31 ms for popcounting a total of 160004121 bits 30 ms for popcounting a total of 159992999 bits 31 ms for popcounting a total of 160005776 bits 31 ms for popcounting a t...
by jj2007
Mar 10, 2019 0:16
Forum: Libraries
Topic: Win10 :Print_to_pdf in batch mode, without prompt for file name
Replies: 7
Views: 530

Re: Win10 :Print_to_pdf in batch mode, without pronpt for file name

Great stuff, marpon! Here is a condensed test file using #define path and #define win10: #define PdfPath "C:\FreeBasic\Print_to_Pdf-master" #define Win10 1 ' put 0 if you run it on older Windows versions /' test example to use libPrint2Pdf32.a or libPrint2Pdf64.a version 1.0 by marpon 08 M...
by jj2007
Mar 09, 2019 11:35
Forum: General
Topic: (SOLVED) macro _WIN32_WINNT return wrong
Replies: 11
Views: 572

Re: (SOLVED) macro _WIN32_WINNT return wrong

To clarify one more bit: It's a constant because YOU instruct the compiler which is your target platform. So, if you are working on an application that is supposed to run on a thousand very, very old Windows XP machines, then you tell the compiler "hey, this is old stuff, please do not use func...
by jj2007
Mar 09, 2019 11:23
Forum: Tips and Tricks
Topic: Code size
Replies: 5
Views: 527

Re: Code size

your code has little, if any use, in practice. I was curious if there was any difference between these two ways to open a file and get a pointer to its content: Dim as long flen=Lof(f) #define version 0 #if version Dim as ubyte ptr pContent = Allocate(Lof(f)), CurPos=pContent, CrPos Get #f, 1, *pCo...
by jj2007
Mar 08, 2019 23:32
Forum: General
Topic: (SOLVED) macro _WIN32_WINNT return wrong
Replies: 11
Views: 572

Re: macro _WIN32_WINNT return wrong

Win7-64 should be version 6.1, build 7601 but the macro returns 1282.
by jj2007
Mar 08, 2019 19:39
Forum: Libraries
Topic: Win10 :Print_to_pdf in batch mode, without prompt for file name
Replies: 7
Views: 530

Re: Win10 :Print_to_pdf in batch mode, without pronpt for file name

Does it miss a file?

Code: Select all

ld.exe: cannot find -lpdfgen32
by jj2007
Mar 08, 2019 9:08
Forum: Tips and Tricks
Topic: Code size
Replies: 5
Views: 527

Code size

This is a simple routine to calculate the size of the generated code. This is 32-bit code compiled with GAS - try the same with GCC-32! See also what changes when you define num1 and num2 as doubles. Dim shared globalvar as integer=1000 Dim shared CodeSize as integer Function foo( num1 as integer, n...
by jj2007
Mar 07, 2019 16:42
Forum: General
Topic: Loading Files
Replies: 6
Views: 408

Re: Loading Files

Are these equivalent? Dim as string content=Input(Lof(f) , #f) Dim as ubyte ptr pContent = @content[0] Dim as ubyte ptr pContent = Allocate(Lof(f)) Get #f, 1, *pContent, Lof(f) Do both work for Windows and Linux? I did some tests, and results look equal. Is one of the two preferred in FB, and if yes...
by jj2007
Mar 07, 2019 15:33
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) :-)
Replies: 56
Views: 4300

Re: Gas64 (no more use of gcc, only gas) :-)

Weird errors - is this a wrapper around GCC??

Code: Select all

error 91: Executable not found: "C:\FreeBasic\bin\win64\gcc.exe"
by jj2007
Mar 07, 2019 12:21
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) :-)
Replies: 56
Views: 4300

Re: Gas64 (no more use of gcc, only gas) :-)

Am I the only one who cannot open the archive at http://users.freebasic-portal.de/sarg/fbcgas64.zip? I've reinstalled 7zip, and now instead of "unsupported compression method" I get plenty of "header errors"...
by jj2007
Mar 07, 2019 11:44
Forum: Projects
Topic: Gas64 (no more use of gcc, only gas) :-)
Replies: 56
Views: 4300

Re: Gas64 (no more use of gcc, only gas) :-)

Hi SARG,

I've opened a benchmarking thread here, and would be curious how Gas64 performs.

Btw the archive posted on top of this thread opens in 7zip but throws errors: "unsupported compression methods" etc
by jj2007
Mar 07, 2019 11:21
Forum: General
Topic: Speed Speed Speed: FB compiler benchmarks
Replies: 0
Views: 443

Speed Speed Speed: FB compiler benchmarks

Below a little testbed to benchmark our three main compilers: Gas, Gcc32 and Gcc64. It consists of two parts: 1. the main testbed , set up for little routines, for example (load mshtmlc.bi into a string array, then check how many lines contain the word "define" using the bmParser() functio...
by jj2007
Mar 06, 2019 12:36
Forum: Beginners
Topic: Unicode and files
Replies: 10
Views: 902

Re: Unicode and files

It's not a Windows problem. The build itself works just fine, and the compiler(s) can handle the Arabic filename ip = "لغة البرمجة الأساسية مجانية.bi" used for LoadFile. It is just the #include that doesn't work, which is an internal issue of the compiler(s).

Go to advanced search