Liberty BASIC Community Forum
« LB5 speed? »

Welcome Guest. Please Login or Register.
Jul 25th, 2017, 11:47am


Rules|Home|Help|Search|Recent Posts|Notification


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: LB5 speed?  (Read 574 times)
mikeschn
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 54
xx LB5 speed?
« Thread started on: Nov 16th, 2012, 3:29pm »

Have any of you guys/gals that have played with LB5, notice if there are any speed gains over LB4?

Just wondering. smiley

Mike...
User IP Logged

Brandon Parker
Board Moderator

member is offline

Avatar




PM

Gender: Male
Posts: 1105
xx Re: LB5 speed?
« Reply #1 on: Nov 16th, 2012, 8:17pm »

From what I have seen LB 5 will definitely have a huge speed increase over LB 4. It may even get better as Carl optimizes the underlying code as time goes on. Some things might be slower or the same speed, but we will have to see when it's all finished and polished up.

Just to give you an idea here is an example of some speed increase in the code below:

Code:
    'sieve2.bas
    'Notice that arrays are globally visible to functions.
    'The sieve() function uses the flags() array.
    'This is a Sieve benchmark adapted from BYTE 1985
    ' May, page 286

    size = 7000
    dim flags(7001)
    start = time$("ms")
    count = sieve(size)
    finish = time$("ms")
    print count; " primes found."
    print "End of iteration.  Elapsed time in milliseconds: "; finish-start
    end

    function sieve(size)
        for i = 0 to size
            if flags(i) = 0 then
                prime = i + i + 3
                k = i + prime
                while k <= size
                    flags(k) = 1
                    k = k + prime
                wend
                sieve = sieve + 1
            end if
        next i
    end function 


Running this Sieve in LB 4 I find that over 10 runs the average time for completion is ~110 - 130ms.

Running the same code in the current release of LB 5 I find that over 10 runs the average time for completion is ~15-19ms.

When you compare the highest times that almost 7 times faster with the current LB 5 release than with the current release of LB 4.

That's not too shabby if you ask me........

{:0)

Brandon
« Last Edit: Nov 16th, 2012, 8:19pm by Brandon Parker » User IP Logged

Windows 7 Home Premium 64-bit Intel(R) Quad Core(TM) i5 CPU M 430 @ 2.27GHz 4GB DDR3 RAM
mikeschn
Junior Member
ImageImage


member is offline

Avatar




PM


Posts: 54
xx Re: LB5 speed?
« Reply #2 on: Nov 17th, 2012, 8:04pm »

Awesome! That's something to look forward to! smiley

Mike...
User IP Logged

mskl007
Guest
thumbup Re: LB5 speed?
« Reply #3 on: Nov 12th, 2014, 3:00pm »

OY GOODNESS: LB5 IS GOING TO BE ACE! I'M SO EXCITED! I CAN'T WAIT FOR IT TO COME OUT! Just one question, since I already have a gold licence in LB 4.04, can I get the update for free? huh grin grin grin grin
User IP Logged

Chris Iverson
Administrator
ImageImageImageImageImage


member is offline

Avatar

20% Cooler


Homepage PM

Gender: Male
Posts: 2271
xx Re: LB5 speed?
« Reply #4 on: Nov 12th, 2014, 6:32pm »

If you purchased your license for LB v4.04 after December 11, 2011, you should be able to get a free upgrade to LB5 from Carl.

http://libertybasic.conforums.com/index.cgi?board=software&action=display&num=1323642059



If you purchased it before then, then the upgrade will be around ~20USD(IIRC, major version upgrades for LB have been $20 in the past)
User IP Logged

"Do you believe in destiny?" - Pyrrha Nikos, RWBY
"With what wish will your Soul Gem shine?" - Kyubey, Puella Magi Madoka Magica
mskl007
Guest
xx Re: LB5 speed?
« Reply #5 on: Nov 27th, 2014, 02:59am »

I got it at the beginning of this year! Awesome!

EDIT: No, that was Just BASIC, Liberty BASIC I bought around half a year after that.
« Last Edit: Nov 27th, 2014, 03:00am by mskl007 » User IP Logged

Geek
Junior Member
ImageImage


member is offline

Avatar

Code to kill bugs!


PM

Gender: Male
Posts: 79
xx Re: LB5 speed?
« Reply #6 on: Mar 30th, 2015, 08:21am »

on Nov 16th, 2012, 8:17pm, Brandon Parker wrote:
From what I have seen LB 5 will definitely have a huge speed increase over LB 4. It may even get better as Carl optimizes the underlying code as time goes on. Some things might be slower or the same speed, but we will have to see when it's all finished and polished up.

Just to give you an idea here is an example of some speed increase in the code below:

Code:
    'sieve2.bas
    'Notice that arrays are globally visible to functions.
    'The sieve() function uses the flags() array.
    'This is a Sieve benchmark adapted from BYTE 1985
    ' May, page 286

    size = 7000
    dim flags(7001)
    start = time$("ms")
    count = sieve(size)
    finish = time$("ms")
    print count; " primes found."
    print "End of iteration.  Elapsed time in milliseconds: "; finish-start
    end

    function sieve(size)
        for i = 0 to size
            if flags(i) = 0 then
                prime = i + i + 3
                k = i + prime
                while k <= size
                    flags(k) = 1
                    k = k + prime
                wend
                sieve = sieve + 1
            end if
        next i
    end function 


Running this Sieve in LB 4 I find that over 10 runs the average time for completion is ~110 - 130ms.

Running the same code in the current release of LB 5 I find that over 10 runs the average time for completion is ~15-19ms.

When you compare the highest times that almost 7 times faster with the current LB 5 release than with the current release of LB 4.

That's not too shabby if you ask me........

{:0)

Brandon

Still slow.... :(
« Last Edit: Mar 30th, 2015, 08:23am by Geek » User IP Logged

Brandon Parker
Board Moderator

member is offline

Avatar




PM

Gender: Male
Posts: 1105
xx Re: LB5 speed?
« Reply #7 on: Mar 30th, 2015, 11:35am »

This thread was a question with regards to the speed of LB 5 vs LB 4.

The speed increase compared to other, especially compiled languages, may not be significant, but it is still an increase over LB 4. We all know that even LB 5 will be slower than some other languages, but that's a trade-off you have to accept; that's just how it is and I'm fine with that.

Your comment which doesn't even give an example of why you think it is slow looks like an attempt to "Bump" your post count. On many other forums you would probably have been reprimanded for such a post.

I will only say that in the event that you feel that it is necessary to post to an old thread then try to add some value to the thread. No one here is forcing anyone to use LB so if you are not satisfied with the performance or require something beyond what LB can deliver then there are definitely an abundance of languages out there to choose from.


{:0)

Brandon
« Last Edit: Mar 30th, 2015, 11:35am by Brandon Parker » User IP Logged

Windows 7 Home Premium 64-bit Intel(R) Quad Core(TM) i5 CPU M 430 @ 2.27GHz 4GB DDR3 RAM
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Rules|Home|Help|Search|Recent Posts|Notification

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