LBB much slower than LB in this pgm

Discussions about the Liberty BASIC language, with particular reference to LB Booster
guest
Site Admin
Posts: 192
Joined: Tue Apr 03, 2018 1:34 pm

Re: LBB much slower than LB in this pgm

Post by guest »

xtal wrote: Sun Dec 29, 2019 7:16 pmI use this for LBB open "com12:115200,n,8,1" for random as #serial
I ran this program as a 'sanity check' (using a Prolific USB-to-serial adaptor, but not connected to anything):

Code: Select all

    open "com3:115200,n,8,1" for random as #serial
    start = time$("ms")    
    for n = 1 to 10000
      print #serial, "ABCDEFGHIJKLMNOPQRST"
    next n
    finish = time$("ms")
    nchars = 10000 * (20 + 2)
    print "Actual time taken = "; finish - start; " milliseconds"
    print "Expected time = "; nchars / 11.520 ; " milliseconds"
    end
The result using LBB was as follows:

Code: Select all

Actual time taken = 19357 milliseconds
Expected time = 19097.2222 milliseconds
So it only took about 250 ms longer than the theoretical expected time. That's what I would expect, and doesn't suggest to me that there's a problem (at least, not here).
xtal
Posts: 20
Joined: Fri Apr 06, 2018 12:17 am

Re: LBB much slower than LB in this pgm

Post by xtal »

all 4 of my w10 machines give very large values fore your short pgm.
are you running w10?
are you forcing hi priority

machine 1 220059 ms LBB LB 30020 ms 4cpu 8gb 18 items in sys tray
machine 2 220025 ms LBB LB NT 2cpu 4gb 6 items in sys tray
machine 3 220060 ms LBB LB NT 4cpu 8gb 9 items in sys tray
machine 4 219999 ms LBB LB NT 6cpu 16gb 14 items in sys tray

I will try to install/test LB on same
guest
Site Admin
Posts: 192
Joined: Tue Apr 03, 2018 1:34 pm

Re: LBB much slower than LB in this pgm

Post by guest »

xtal wrote: Sun Dec 29, 2019 9:13 pm
are you running w10?
Yes, Windows 10, fully updated. PC is a Dell XPS-13 laptop with an Intel Core i7 CPU.
are you forcing hi priority
No, just running LBB out of the box. Serial I/O is so slow that it probably wouldn't make a significant difference anyway.

Are you sure you're not using one of the fake/clone USB-serial adaptors? Sadly they are only too common. I know for sure that mine is genuine. Some official drivers detect the fake chips and could be responsible for terrible performance.
xtal
Posts: 20
Joined: Fri Apr 06, 2018 12:17 am

Re: LBB much slower than LB in this pgm

Post by xtal »

! is generic FTDI other is CP210x I just got a while back. Clones ????

I have AMD cores
guest
Site Admin
Posts: 192
Joined: Tue Apr 03, 2018 1:34 pm

Re: LBB much slower than LB in this pgm

Post by guest »

xtal wrote: Sun Dec 29, 2019 9:30 pm ! is generic FTDI other is CP210x I just got a while back. Clones ????
Some more information here.

I could try my program on other PCs (including one with an AMD CPU) if you want, but I only have genuine USB-serial adaptors (some of my applications need functionality like hardware flow-control so that's important to me).
xtal
Posts: 20
Joined: Fri Apr 06, 2018 12:17 am

Re: LBB much slower than LB in this pgm

Post by xtal »

yea give it a shot .
let me know how it goes and what adapters you have...
guest
Site Admin
Posts: 192
Joined: Tue Apr 03, 2018 1:34 pm

Re: LBB much slower than LB in this pgm

Post by guest »

xtal wrote: Sun Dec 29, 2019 9:49 pm yea give it a shot .
My Windows 10 / Intel Core i7 desktop gave the same result as the laptop, near enough. Unfortunately the program won't work at all on my AMD PC because that's running Windows 7 and it won't accept 115200 as a valid baud rate.

Have you tried different baud rates to see if the problem scales with speed, or indeed is specific to 115200? I note that the timings you listed correspond, almost precisely, to 10,000 baud (1000 characters per second) which seems unlikely to be a coincidence. Might there be something capping the speed to that value?
xtal
Posts: 20
Joined: Fri Apr 06, 2018 12:17 am

Re: LBB much slower than LB in this pgm

Post by xtal »

what adapter are you using. ????
I will try a couple of laptops and maybe verify different baud rates later.
thx for the input...
guest
Site Admin
Posts: 192
Joined: Tue Apr 03, 2018 1:34 pm

Re: LBB much slower than LB in this pgm

Post by guest »

xtal wrote: Sun Dec 29, 2019 11:00 pm what adapter are you using. ????
The same one I used on the laptop: Prolific Rev. D chipset, identical to this. At £20 this is quite a lot more expensive than some of the fakes/clones, although cost is no guarantee of quality. The seller emphasises that it is genuine.

The Prolific website contains the following warning: "Please be warned that counterfeit (fake) PL-2303HX (Chip Rev A) USB to Serial Controller ICs using Prolific's trademark logo, brandname, and device drivers, were being sold in the China market. Counterfeit IC products show exactly the same outside chip markings but generally are of poor quality and causes Windows driver compatibility issues (Yellow Mark Error Code 10 in Device Manager). We issue this warning to all our customers and consumers to avoid confusion and false purchase".

You might want to check that there isn't a yellow warning against your adapter in Device Manager, although again the absence of one doesn't mean the device is definitely genuine.
xtal
Posts: 20
Joined: Fri Apr 06, 2018 12:17 am

Re: LBB much slower than LB in this pgm

Post by xtal »

I think AMD / windows drivers may be issue....

Dell inpiron XP_____LBB 19s+________LB 19s+_____ProlificXHA_____C210x_____FTDI
Dell I5 chip set W10____LBB 33s+________LB 25s+_____ProlificXHA_____C210x_____FTDI
Gateway Laptop W7_____LBB 220s+_______LB 30s+_____ProlificXHA_____C210x_____FTDI