Results 1 to 40 of 73

Thread: how to Fast Call cdecl api like sqlite3.dll?

Threaded View

  1. #31

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: hao to call Sqlite3.dll with cdecl?

    main code in reply:#48
    can't upload cdecl.dll (api=Add),sorry!
    Add(11,22)=33
    DOWN test: CDECL_speed Test.zip
    Some people are not interested in this at all. Those who are interested in it will write an example to test. Using other programming languages to generate a cdecl API of addition operation, DLL file is on the line. Hard work, because I used to test a cdecl V8 JS calculation, and SQLite has nothing to do with it. All these DLL files are not allowed to be uploaded.

    In fact, my focus is not on how to handle SQLite, but on how to call cdecl API to minimize the overhead

    how to call cdecl if fast,you can try.
    sorry,my code is too much ,and i put the testcode ,you can try yourself.
    i put more method for call cdecl,now i add one again.
    'Rmlistview.rar cCDECL.cls
    'http://read.pudn.com/downloads80/sourcecode/others/306578/listview/32bpp%20DIB/cCDECL.cls__.htm
    test:times=50 , fotnext=100000
    Call Cdecl dll api ,UsedTime:
    cCDECL.CLS--2389.5272 MS

    Call Cdecl dll api ,UsedTime:
    VbAddRef--103.6018 MS
    VbAdd--99.4034 MS
    CallCdecl--153.6503 MS
    Com vTable--3129.5649 MS
    DispCallFunc--4215.9675 MS
    ClassAdd--237.5009 MS
    ClassAddRef--246.6976 MS
    ClassFriendAdd--109.4997 MS


    Code:
    Dim Lib_cCDECL As New cCDECL
    'C = Lib_cCDECL.CallFuncAddress(ExcuteJavaScript_Ptr, a, b)
    With Lib_cCDECL
    For K = 1 To KMAX
    For i = 1 To Count
        a = i
        b = i * 2
        QueryPerformanceCounter CPUv1
        ret = .CallFuncAddress(ExcuteJavaScript_Ptr, a, b)
        QueryPerformanceCounter CPUv2
        
        CusedTime = (CPUv2 - CPUv1) / MsCpu
        TimeSz(8) = TimeSz(8) + CusedTime
    Next
    Next
    End With
    down test CDECL_speed Test.zip
    Help
    1.95 MB of 9.54 MB Used(why not 1000mb?)
    File Upload Manager - Manage all files that you have uploaded
    Last edited by xiaoyao; Dec 5th, 2020 at 06:08 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