Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Speed: VFP 6 vs VB
Message
De
11/09/1998 12:03:00
 
 
À
11/09/1998 11:02:56
Bob Lucas
The WordWare Agency
Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00135486
Message ID:
00135501
Vues:
11
I'm curious. How did VFP do against Powerbuilder and Delphi?

>At a recent user group meeting one of our members did some string manipulation comparisons between VFP, Powerbuilder 5, Delphi and VB. I duplicated these yesterday using VFP 6 and VB. The results are interesting.
>
>VB:
>add a text box onto a VB form and place the following code into the load.
>
>Private Sub Form_Load()
> Dim str As String
> Dim i As Integer
> Dim sngStart As Single
> Dim sngLoopTime As Single
>
> str = " "
> sngStart = Timer()
> For i = 1 To 10000
> str = str & CStr(i)
> Next
> sngLoopTime = Timer() - sngStart
>
> Me.Text1.Text = "Time: " & sngLoopTime & str
>
>End Sub
>
>
>VFP:
> I did a little more and added an edit box and a command button to start the comparison. Here is the code in the click of the command button. The VFP code actually has to do more by updating the edit box but let's ignore that.
>
>LOCAL cstr, lnow, lnow2
>cstr = ''
>
>lnow = seconds()
>FOR i = 1 to 10000
> cstr = cstr + str(I)
>endfor
>
> thisform.edit1.value = cstr
>lnow2 = seconds()
>wait window str(lnow2 - lnow, 9, 6)
>
>
>Results:
>I saved these for the end. On my PC (P-150 64 MB) the VB 5 code took 17.18 seconds. The VFP 6 code took 0.315 seconds. I would call that substantially better performance. When I boosted the counter to 100000 VFP took only 3.397 seconds. I couldn't test VB 5 because even at 30000 the process stopped responding and I had to Ctl-Alt-Delete to kill it. Maybe it was just afraid to answer.
>
>While this may be a totally useless exercise I had great fun with it yesterday. One of the VB'ers here tested it with 6.0, p-code vs native code etc. Admittedly VB 6 is faster than VB 5. It is only 12 - 15 times slower that VFP 6 rather than 50 times slower.
>
>While I'm at it:
>
>Though my current development environment is VB 5, 3-tier and SQL Server it reminds me often of DBASE IV. Back in those dreadful days I always seemed to be looking for workarounds for things that just didn't work. Nowadays it seems pretty much the same. There is always something that just doesn't work. This fact seems quite acceptable. One of the joys of Fox and VFP was the fact that I rarely needed workarounds. Just an observation and these comments are not meant to cast aspersions against the dogmatic postions, real or imagined, that anyone might have.
William Chadbourne
Senior Programmer/Analyst
State of Maine - DAFS App Team

Oracle - When you care enough to use the very best!!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform