On 12/19/10, Balázs Galambosi <[email protected]> wrote:
> 2010/12/19 Garrett Smith <[email protected]>:
[...]

>
> I like your tests. I would love to see how new versions of browsers
> perform. I ran the tests on my computer out of curiosity:
>
> Windows 7 Ultimate on an AMD 64 x2 Dual Core 5200+ (2.7GHz)
>
> https://spreadsheets.google.com/pub?key=0AkXKo_3bj2oXdDRfUFlSWFJxdlJvbDJPWl85dlFqREE&hl=en&single=true&gid=0&output=html

Thanks for reporting your results.

>
> - The old results are from your table. So comparing the two is of
> course nonsense.
> - Opera 11 crashes for me after the first test.
> - IE 9 gives "Error: Object doesn't support this property or method"
> for `fdoc.clear();` so it was commented out.
>
> - Firefox 4.0b8pre is blazingly fast for everything except closures
> and objCreate. I mean closures are fast, but still not on pair with
> Chrome.

Seems Firefox 4.0pre is fast going *through* a closure, to global.
These two are fast: closureToGlobalAssign, closureToGlobalRead.

> - Chrome 10 (Canary build with Crankshaft): ok performance for
> everything, but closures are like a miracle here.

Yeah, super fast.

> - IE 9 is a bit strange. 1135ms for localRead? Something is not right
> here. Maybe I need to reinstall.

Well if document.clear() is failing, that's also a bug. Though
unrelated. document.clear has been around since before I started,
around NS4 / IE5.

>
> Better yet you could test these browsers on your computer, and so the
> numbers become comparable with the old ones.
>

Might not be possible.

I believe I used two machines: One mac (for Safari 2) and a Dell
running a cracked version of  windows vista ultimate for the others.
That Dell is now running a legal copy of Windows 7, though is missing
drivers. Dell's official website states that Windows 7 is not
available, and that I can buy a new Dell. Anyway, that environment is
no longer available (which is a good thing overall).

[...]

>
> Because of the way how @private works, yes, it's not really private.
> It's more for those coming from Java or compiled languages who used to
> catch such errors at "compile time". I do think that @private in its
> current form is not doing much, because properties pre/postfixed with
> _ are already marked as private, and one has to be a bit silly if
> messes with such members of an object from outside.
>
Sure, but the definition of "private" is kind of loose. I believe I
have seen cases where a "subclass" was using "_" prefixed methods in
the "superclass". Other conventions include using double underscore or
one or more underscores at the end of the property name, as in
"myPrivateProp_".

> But if pornwar3zads.js is successfully injected to your site it can do
> harm no matter if closures are used or not. Because it can access and
> mess with built-in and host objects you're using throughout your
> application. It's much more of a concern.
>
Sure, or it could use location.replace("http://example.net/";);

> Finally, it may well be that the OOP system only kicks in if ADVANCED
> more is turned on, and it's by definition meant to be processing
> you're whole application. Still no excuse if you want real privacy of
> course.
>
Well a closure can be used to hide something.

It's late. I'm going to sleep now.
-- 
Garrett

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to