FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour CGIs speed test
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
CGIs speed test
Posted: Sun May 23, 2021 12:41 PM
small test in C language running on remote Debian server:

test.c
Code (fw): Select all Collapse
// build it doing: gcc test.c -otest

#include <stdio.h>

int main()
{
   printf( "%s%s\n\n", "Content-Type:", "text/plain" );
   printf( "%s\n", "Hello world from CGI" );

   return 0;
}


You can test it on http://www.modharbour.org/cgi-bin/test
Execution speed: around 100ms

Now, using a small Harbour test:

testh.prg
Code (fw): Select all Collapse
REQUEST HB_GT_STD_DEFAULT
REQUEST HB_GT_STD

function Main()

   Test()

return nil

procedure HB_GTSYS
return

#pragma BEGINDUMP

#include <hbapi.h>
#include <stdio.h>

HB_FUNC( TEST )
{
   printf( "%s%s\n\n", "Content-Type:", "text/plain" );
   printf( "%s\n", "Hello world from CGI" );
}

#pragma ENDDUMP


You can test it on http://www.modharbour.org/cgi-bin/testh
Execution speed: around 130ms
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion