On Fri, Sep 28, 2007 at 08:10:06PM +0000, Martin Kersten wrote:
> Update of /cvsroot/monetdb/MonetDB5/src/mal
> In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18777
>
> Modified Files:
> mal_interpreter.mx
> Log Message:
> Avoid complaints by compilers by switching to the preprocessor.
Martin,
before you wonder why the SLOW ans FAST cases don't show any differences any
more --- neither performance nor in speed ---:
Since your code defines both macros SLOW (as 1) and FAST (as 0), directives
#ifdef @1
with @1 being substituted with either SLOW or FAST by Mx, always evaluate to
true, regardsless of whether @1 is SLOW (== 1) or FAST (== 0).
As initially suggested by both Sjoerd and me, you might want to use
#if @1
directives, instead, to re-establish your (supposely) intended behaviour.
Stefan
> Index: mal_interpreter.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_interpreter.mx,v
> retrieving revision 1.198
> retrieving revision 1.199
> diff -u -d -r1.198 -r1.199
> --- mal_interpreter.mx 28 Sep 2007 16:00:57 -0000 1.198
> +++ mal_interpreter.mx 28 Sep 2007 20:10:04 -0000 1.199
> @@ -743,13 +743,15 @@
> case ENDsymbol:
> if( getInstrPtr(mb,0)->token == FACTORYsymbol)
> ret= shutdownFactory(mb);
> - if( @1 && oldtimer)
> +#ifdef @1
> + if( oldtimer)
> cntxt->timer= oldtimer;
> +#endif
> if( pcicaller && garbageControl(getInstrPtr(mb,0)) )
> garbageCollector(mb, stk, TRUE);
> - if(@1){
> - @:endProfile@
> - }
> +#ifdef @1
> + @:endProfile@
> +#endif
> stkpc= mb->stop;
> continue;
> default:
> @@ -759,9 +761,9 @@
> }
> ret = createScriptException(mb, stkpc,MAL,
> NULL, "unkown operation");
> - if( @1){
> - @:endProfile@
> - }
> +#ifdef @1
> + @:endProfile@
> +#endif
> stkpc= mb->stop;
> continue;
> }
> @@ -1027,7 +1029,8 @@
> }
> }
> /* Provide debugging support */
> - if( @1 && (GDKdebug & 10) ){
> +#ifdef @1
> + if( GDKdebug & 10 ){
> BAT *b;
> str oldmsg =0;
>
> @@ -1061,6 +1064,7 @@
> }
> }
> }
> +#endif
> @-
> @= commandcall
> {
> @@ -1599,7 +1603,8 @@
> #endif
>
> @= timingHndlr
> -if( @1 && cntxt->flags && stk->cmd != 't' && stk->cmd != 'C'){
> +#ifdef @1
> +if( cntxt->flags && stk->cmd != 't' && stk->cmd != 'C'){
> if( cntxt->flags & timerFlag)
> stream_printf(cntxt->fdout,"[%6d usec ",GDKusec()-cntxt->timer);
> #ifdef HAVE_SYS_RESOURCE_H
> @@ -1641,6 +1646,7 @@
> if( cntxt->flags & timerFlag)
> cntxt->timer = GDKusec();
> }
> +#endif
> @-
> The bigfoot memory tracker keeps track on the space
> occupancy of BATs. It ignores for the time being the heaps.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Monetdb-checkins mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/monetdb-checkins
>
--
| Dr. Stefan Manegold | mailto:[EMAIL PROTECTED] |
| CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ |
| 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 |
| The Netherlands | Fax : +31 (20) 592-4312 |
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-developers