Results 1 to 40 of 2079

Thread: TwinBasic

Threaded View

  1. #11
    PowerPoster
    Join Date
    Jul 2010
    Location
    NYC
    Posts
    7,667

    Re: TwinBasic

    The unoptimized native code tB currently produced is faster than VB6 P-Code but slower than VB6 native code optimized for speed.

    But tB has some features here I forgot to list.

    You can specify [ IntegerOverflowChecks(False) ], [ FloatingPointErrorChecks(False) ] and [ ArrayBoundsChecks(False) ] on a per-procedure level, so you can leave those on generally, but disable them for performance-critical routines, and greatly improve performance. I don't recall what the numbers came out to vs. VB6's code without disabling those options project-wide.

    Another one I forgot is [ ConstantFoldable ]-- tB has constant function folding, which can resolve function calls that will never change at compile time, rather than executing them at runtime.

    So for example.

    Code:
    [ ConstantFoldable ]
    Private Function ToANSI(sIn As String) As String
        Return StrConv(sIn, vbFromUnicode)
    End Function
    When constant function folding is enabled,

    Code:
    Private Foo As String
    
    Foo = ToANSI("Bar")
    is computed and the result stored in your exe at compile time, so the function doesn't need to run when the result will never change.

    AFAIK the plan for optimized exes to be subscriber only hasn't changed; but I don't think that's too unreasonable.

    @yereverluvinuncleber, yes, that's a list of new features you can use right now in the current build of tB. I've updated the list with these and some others I forgot at first. The list of planned but not yet implemented features is a separate list with a lot more on it.
    Last edited by fafalone; Mar 13th, 2023 at 08:50 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width