Search found 1130 matches

by jj2007
Aug 18, 2017 19:00
Forum: General
Topic: How to reduce the filesize of a compiled file?
Replies: 65
Views: 3591

Re: How to reduce the filesize of a compiled file?

It seems that our *.bi versions are close but not identical. Anyway, here is the full picture: Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz counting took 0.024 seconds 0 1583 matches [type sp case-sensitive] 1 2573 matches [no sp cs] 2 2563 matches [cs+full word] 3 1636 matches [sp+case-insensitive] 4 5...
by jj2007
Aug 18, 2017 12:48
Forum: General
Topic: How to reduce the filesize of a compiled file?
Replies: 65
Views: 3591

Re: How to reduce the filesize of a compiled file?

791 looks a bit low, though: I find 1718. How old is your mshtmlc.bi, how many bytes (and where did you get it from)? In my mshtmlc.bi, there are ten type occurrences that are not found when using full word Instr(): include \masm32\MasmBasic\MasmBasic.inc Init Let esi=FileRead$("mshtmlc.bi"...
by jj2007
Aug 18, 2017 11:53
Forum: General
Topic: How to reduce the filesize of a compiled file?
Replies: 65
Views: 3591

Re: How to reduce the filesize of a compiled file?

Seconds: 0.006208108010469005 Count: 1728 Not bad for a Basic compiler. Apparently, my file has a few more "type" than yours. No, files are identical, and timings very similar: Seconds: 0.007457879837602377 Count: 1728 But you didn't use full word search in Instr(), so your version adds a...
by jj2007
Aug 18, 2017 1:15
Forum: General
Topic: Is there some OCR library that may grab text from a screenchot?
Replies: 10
Views: 744

Re: Is there some OCR library that may grab text from a screenchot?

Ok got the licence term: Royalty-free means you pay when you order a development license, but you don't have to pay again when you deploy your software to thousands of servers or to thousands of end users. Tesseract seems to be open source and free to use. But from what I've read, you need a lot of...
by jj2007
Aug 18, 2017 1:07
Forum: General
Topic: How to reduce the filesize of a compiled file?
Replies: 65
Views: 3591

Re: How to reduce the filesize of a compiled file?

Any decent text editor can save into UTF-32 I have only indecent ones like Notepad++. Can you recommend one for a test? Maybe together with a short example showing how FreeBasic handles UTF-32 Instr()? In fact searching UTF-8 is potentially quite slow, since you can't just look at individual bytes....
by jj2007
Aug 17, 2017 21:30
Forum: General
Topic: How to reduce the filesize of a compiled file?
Replies: 65
Views: 3591

Re: How to reduce the filesize of a compiled file?

Tourist Trap wrote:
dodicat wrote:Maybe the version from here is ok?
http://www.phatcode.net/downloads.php?sub=compilers


Definitely not. This is the official installation guide; but I have a suspicion that you need to register at Masm32 to see downloads.
by jj2007
Aug 17, 2017 14:53
Forum: General
Topic: How to reduce the filesize of a compiled file?
Replies: 65
Views: 3591

Re: How to reduce the filesize of a compiled file?

Sure but what if you want to deal with UTF-16, UTF-8, UTF-32, or any other encoding? UTF-16, UTF-8 and "any other encoding" (I assume you mean ordinary codepages - cyrillic and the like) are built into the language, but I admit I have never thought of UTF-32. Can you zip up a UTF-32 text ...
by jj2007
Aug 16, 2017 23:01
Forum: General
Topic: How to reduce the filesize of a compiled file?
Replies: 65
Views: 3591

Re: How to reduce the filesize of a compiled file?

for case insensitive just make text =lcase(text) and look for "style" in the text. 5396 style .0038 seconds here. 5396 Time taken 0.00446 (vs about 0.003 for MasmBasic) You will perhaps notice that 64 bit freebasic is slower at this task than 32 bit, even with -O3 gcc opimizations. 64-bit...
by jj2007
Aug 16, 2017 21:48
Forum: General
Topic: How to reduce the filesize of a compiled file?
Replies: 65
Views: 3591

Re: How to reduce the filesize of a compiled file?

I agree mshtmlc.bi has only newline (chr(10)) I could not get masmbasic.inc. If masmbasic downloaded as a zip I would try it out. But I don't install with .exe installers. I like to see what is going on. Silly I know! Not silly at all: You don't know me. Even Jotti would warn you that some of my ex...
by jj2007
Aug 16, 2017 19:31
Forum: General
Topic: How to reduce the filesize of a compiled file?
Replies: 65
Views: 3591

Re: How to reduce the filesize of a compiled file?

OK ;-) Btw the mshtmlc.bi that I downloaded from https://fossies.org/linux/privat/FreeBASIC-1.05.0-source.tar.gz/FreeBASIC-1.05.0-source/inc/win/mshtmlc.bi?m=b to test your code has no CrLf, just linefeeds; so initially your code didn't work. But Chr(10) did the job, of course (and MasmBasic's Instr...
by jj2007
Aug 16, 2017 17:12
Forum: General
Topic: What is FreeBasic written in?
Replies: 15
Views: 1316

Re: What is FreeBasic written in?

Thanks. So FB is basically a wrapper on top of C... ;-)
by jj2007
Aug 16, 2017 13:44
Forum: General
Topic: How to reduce the filesize of a compiled file?
Replies: 65
Views: 3591

Re: How to reduce the filesize of a compiled file?

Seconds: 0.002644868538482115 Count: 24974 include \masm32\MasmBasic\MasmBasic.inc Init Let esi=FileRead$("mshtmlc.bi") ; 2,488,437 bytes NanoTimer() Inkey Str$("%i line feeds", Count(esi, Lf$)), Str$(" found in %2f seconds", NanoTimer(ms)/1000) EndOfCode 24974 line fe...
by jj2007
Aug 16, 2017 10:59
Forum: General
Topic: What is FreeBasic written in?
Replies: 15
Views: 1316

Re: What is FreeBasic written in?

By default it directly generates assembly code and uses the GNU assembler (GAS) to build an executable. In the 6880 lines disassembly of a small FB exe, over 100 calls to msvcrt routines are present. If I eliminate the -p C:\TDM-GCC-32\bin from the commandline, I get even more calls to the CRT. Are...
by jj2007
Aug 16, 2017 10:03
Forum: General
Topic: How to reduce the filesize of a compiled file?
Replies: 65
Views: 3591

Re: How to reduce the filesize of a compiled file?

A simple Tally of characters in a string. That is simpler than what the other example does, but it's quite OK because the bottleneck here is Instr() , which is what's working also inside Count (source, part): include \masm32\MasmBasic\ MasmBasic.inc ; download Init totalsize=50000000 mov ecx, total...

Go to advanced search