Efficient Christmas to everyone

O

optimistx

As an exercise a wrote a little js-program to generate statistical data
with random number generators, not much dom-manipulation.

I tried to write the program so that I would now and later
understand what the program tries to do. Simple coding,
short methods, no optimizing for speed or 'efficiency'.

It was fun to write code especially when sometimes I understood
what I was doing.

Examples of the relative execution times were:

ie7 : 27,7 seconds
ff3.5.5: 2,3 seconds
chrome: 0,7 seconds

After that I started to make the program 'efficient' by following some
of the advice I had got (sources censored). The program became
more difficult to read, uglier, longer, more error prone.

But I succeeded to save 0.001 seconds from the execution time.


I felt a real hero. Happy to spend an efficient Christmas now.

Efficient Christmas to everyone. Try to squeeze it 0.1 seconds shorter.
 
D

David Mark

As an exercise a wrote a little js-program to generate statistical data
with random number generators, not much dom-manipulation.

I tried to write the program so that I would now and later
understand what the program tries to do. Simple coding,
short methods, no optimizing for speed or 'efficiency'.

It was fun to write code especially when sometimes I understood
what I was doing.

Examples of the relative execution times were:

ie7 :  27,7 seconds
ff3.5.5:  2,3 seconds
chrome:   0,7 seconds

After that I started to make the program 'efficient' by following some
of the advice I had got (sources censored).  The program became
more difficult to read, uglier, longer, more error prone.

What program? Who told you to make it more "efficient". Sounds like
diminishing returns in this case (and you clearly made a mess doing
it). Always consider the context before applying general advice. ;)
But I succeeded to save 0.001 seconds from the execution time.

What a waste of time (unless you were going to loop through this code
a million times). :)
I felt a real hero. Happy to spend an efficient Christmas now.

Smart-ass doesn't suit you. ;)
Efficient Christmas to everyone. Try to squeeze it 0.1 seconds shorter.

Same.
 
J

JR

As an exercise a wrote a little js-program to generate statistical data
with random number generators, not much dom-manipulation.

I tried to write the program so that I would now and later
understand what the program tries to do. Simple coding,
short methods, no optimizing for speed or 'efficiency'.

It was fun to write code especially when sometimes I understood
what I was doing.

Examples of the relative execution times were:

ie7 :  27,7 seconds
ff3.5.5:  2,3 seconds
chrome:   0,7 seconds

After that I started to make the program 'efficient' by following some
of the advice I had got (sources censored).  The program became
more difficult to read, uglier, longer, more error prone.

But I succeeded to save 0.001 seconds from the execution time.

I felt a real hero. Happy to spend an efficient Christmas now.

Efficient Christmas to everyone. Try to squeeze it 0.1 seconds shorter.

Man, after drinking 2 or 3 pints of a good lager, relaxing at the
Copacabana beach and staring all those gorgeous girls wearing tiny
bikinis, I still can't understand what you're saying... Anyway, I wish
you and everybody at c.l.js a very merry Christmas and a brilliant and
"optimistic" 2010!!! I hope all of us can get more efficient everyday,
enjoying life and our families and dear friends as we do here with
Javascript.

Cheers and all the best,
Joao Rodrigues (JR)
 
D

Dr J R Stockton

In comp.lang.javascript message <[email protected]>,
As an exercise a wrote a little js-program to generate statistical data
with random number generators, not much dom-manipulation.

Its a pity that DM apparently did not read that paragraph before
responding.

If you ever actually use the results, be aware that Math.random is
generally not as good as it should be, and in at least one browser
substantially worse. It probably will not matter, but you need to be
sure of that.

<URL:http://www.merlyn.demon.co.uk/js-262-5.htm> refers.
 
D

David Mark

In comp.lang.javascript message <[email protected]>,


Its a pity that DM apparently did not read that paragraph before
responding.

Its (sic) a pity you apparently did not read my response before
responding. :)
If you ever actually use the results, be aware that Math.random is
generally not as good as it should be, and in at least one browser
substantially worse.  It probably will not matter, but you need to be
sure of that.

So? It wasn't a question. Did you skip the OP as well?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,270
Latest member
TopCryptoTwitterChannels_

Latest Threads

Top