CGIs speed test

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!
Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 44515
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

CGIs speed test

Post by Antonio Linares »

small test in C language running on remote Debian server:

test.c

Code: Select all | Expand

// 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: Select all | Expand

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
Post Reply