Category : Files from Magazines
Archive   : WDMAY92.ZIP
Filename : 3N05066B

 
Output of file : 3N05066B contained in archive : WDMAY92.ZIP
/*=========================== my_timer.c ==================================*/
/* A test program using "my_timer.h" to time the performance difference */
/* between using the function-like macro isdigit() or the corresponding */
/* runtime library function isdigit(); if the preprocessor object-like */
/* macro MY_TIMER is defined, the START and STOP macros are invoked; */
/* otherwise, no such code is generated, and no runtime performance */
/* penalty is imposed - much like using assertions - NDEBUG and assert(); */
/* */
/* Inspect the intermediate file (*.i) generated by the preprocessor to */
/* see the effects of using the START() and STOP macros; use compiler */
/* option -P for Microsoft C; run the CPP.EXE utility Borland C; */
/* */
/* NOTE: Remember to #define MY_TIMER (-DMY_TIMER on the command-line) */
/* before you #include "my_timer.h" */
/*=========================================================================*/
#include

#define MY_TIMER /* This activates the timer code */
#include "my_timer.h"

void main( void) {
char ch = '9';
int i, is;

START(default function-like macro timing);
for (i=0; i STOP;

#undef isdigit

START(alternate function timing);
for (i=0; i STOP;
}
/*=========================== my_timer.c ==================================*/


  3 Responses to “Category : Files from Magazines
Archive   : WDMAY92.ZIP
Filename : 3N05066B

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/