Development Mode/Production Mode

John J Barton johnjbarton at
Tue Apr 3 08:12:24 PDT 2012

On Tue, Apr 3, 2012 at 7:03 AM, David Bruant <bruant.d at> wrote:

> Le 01/04/2012 13:38, Wes Garland a écrit :
>  In a similar vein, I would personally like to have
>> zero-cost-when-not-debugging assert() statements, and am hopeful that
>> statically-linked modules might lead the way.
> It seems to me that what you're asking for is macros, isn't it?
> I read hints here and there that it's a very hard problem that is being
> worked on for a later ES version.

Since most JS is compiled in the run time, macros are not zero cost.

Since most JS runs in a sophisticated JIT capable of dead code elimination,
  const debug = false;
or similar solutions should be able to make the run-time overhead for
assert() insignificant. If you are after the last 0.1% a compressor should
be able to accomplish this as well.


> David
> ______________________________**_________________
> es-discuss mailing list
> es-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list