6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 5:08 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: a MATCH made in heaven
PostPosted: Thu Apr 08, 2021 7:13 pm 
Offline

Joined: Sun Apr 26, 2020 3:08 am
Posts: 357
I've been playing around with trying to speed up some definitions and making them into primitives. An 8-bit computer is all that is needed in most respects. But locating words across a multitude of screens really lacks in that department.

A couple of ideas crossed my mind, and have shown some improvement in speed. But could still be better. The order of progression went something like this.

1) use Forth for all loops and comparisons
2) use primitive to match word one word at a time.
3) use primitive to find a word within a line.
4) use primitive to find a word within a screen.
5) use primitive to find a word within 16k block of screens or up to 16k text file fully in memory

All times are at 1 Mhz
Step 1 takes about 75 seconds
Step 2 takes about 55 seconds
Step 3 takes about 40 seconds
Step 4 takes about 2 seconds
Step 5 not tested yet, but should even be much faster than step 4.

Both the screens methods are very fast at 1 Mhz and greatly increases Forth's fun factor on an 8-bit machine.

Searching through 100's of screens now is no longer a chore.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: