BBC BASIC for Windows
« Slow execution when clicking 'Run' »

Welcome Guest. Please Login or Register.
Feb 21st, 2018, 1:50pm


BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Slow execution when clicking 'Run'  (Read 113 times)
Gian7281
New Member
Image


member is offline

Avatar




PM


Posts: 2
xx Slow execution when clicking 'Run'
« Thread started on: Feb 3rd, 2018, 11:56pm »

Hello,

I wrote a short program which fits in one page.
When I click 'Run' (without compiling it) it takes about 12-15 seconds to get a result on screen on my Win7 Pro, overclocked (4.4Ghz) PC with SSD drive.
Same program takes 1 seconds on my Win 8.1 MS Surface tablet.
I cannot explain the difference in performance and what it is slowing down BBC Basic considering that I can compile and run the same program in C in 1 second on my PC.

Any advise on that matter is much appreciated.

Many thanks,

Gian
User IP Logged

michael
Senior Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 327
xx Re: Slow execution when clicking 'Run'
« Reply #1 on: Feb 4th, 2018, 8:06pm »

Quote:
I cannot explain the difference in performance and what it is slowing down BBC Basic considering that I can compile and run the same program in C in 1 second on my PC.


That is irrelevant to BBC Basic for Windows.

Firstly, you have provided no code.

Secondly, C is not the easiest language to get things done.

If you find C to be a good platform to perform the tasks you need to do, then use it.


User IP Logged

I like making program generators and like reinventing the wheel
DDRM
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 313
xx Re: Slow execution when clicking 'Run'
« Reply #2 on: Feb 5th, 2018, 1:19pm »

Hi Gian,

Given recent arguments, I feel constrained to point out that you would get more expert advice at the "other" forum:

http://bbcbasic.conforums.com/

In the meantime....

BBC BASIC is an interpreted language, and a 10-fold slower execution than a compiled C program probably isn't surprising. It's more surprising if you are getting significantly faster execution of the same program (in the same language) on your tablet.

Do other BB4W programs run at different speeds on the two devices?

If you can post code others of us will have a look, and maybe try it out. Things which tend to be "very slow" are writing to the screen 1 pixel at a time, or deeply nested multiple loops.

You can post code in a code box by sandwiching it between tags: use (code] and (/code] tags - but with both square brackets - I've changed to round so it doesn't do it!

Best wishes,

D
User IP Logged

Gian7281
New Member
Image


member is offline

Avatar




PM


Posts: 2
xx Re: Slow execution when clicking 'Run'
« Reply #3 on: Feb 7th, 2018, 5:57pm »

Hi,

Sorry, I think there has been a misunderstanding.

I was not making a comparison between BBC Basic and C, rather I tried to work out what might interfere with the correct functioning of BBC Basic in a Windows O/S.

I was trying to find out why the same code took 10-15 longer on a powerful PC compared to my Surface tablet.

Eventually I was advised by Mr Russell (that Mr Russell at www.bbcbasic.co.uk) to check whether the printer I was connected to was offline and indeed that was the cause.
Nothing to do with code.

Regards,
Gian
User IP Logged

michael
Senior Member
ImageImageImageImage


member is offline

Avatar




PM


Posts: 327
xx Re: Slow execution when clicking 'Run'
« Reply #4 on: Feb 8th, 2018, 12:29am »

Quote:
I was not making a comparison between BBC Basic and C, rather I tried to work out what might interfere with the correct functioning of BBC Basic in a Windows O/S.

I was trying to find out why the same code took 10-15 longer on a powerful PC compared to my Surface tablet.


No worries. Text is misleading and inflammatory.

I was just trying to get more information and suggesting that if C was doing what you needed, then it may be the right choice.

( In my opinion, BBC Basic is far easier than most languages and provides a classic style editor. Its a very stable tool and makes it easy to get things done)

Best wishes,
Michael
« Last Edit: Feb 8th, 2018, 12:33am by michael » User IP Logged

I like making program generators and like reinventing the wheel
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls