Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: Re: Can somebody explain this to me Date: Thu, 08 Jan 2015 13:16:03 +0100 Organization: solani.org Lines: 38 Message-ID: References: <1590597.KOVAYohEvS@PointedEars.de> <1761561.NWXpXnK3hu@PointedEars.de> <4ikqaa9iqmr7jd2qtiqhbsv47frcvjq12t@4ax.com> <1pnsaala8on177lled28bf7utufq4oojvs@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1420719358 23984 eJwFwQERACAIA8BKwBjTOChn/wj+E+V1lcVKPj4s11gciEOLAI6VendfudgbKBstfxk9Yx/8WRAt (8 Jan 2015 12:15:58 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 8 Jan 2015 12:15:58 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 X-User-ID: eJwFwYERAEEEBLCWPHZRDjf0X8InMH584QQdh+vRVwcLaNnlevWRI5mqxG5XcXYtvGVF5gcbZxER In-Reply-To: <1pnsaala8on177lled28bf7utufq4oojvs@4ax.com> Cancel-Lock: sha1:oo8K2MNZid/i6kaTtSZhKd7ETvc= X-NNTP-Posting-Host: eJwFwQkBACAIA8BKbDLQOODTP4J3GoHY6aFwPT3kKM1azUA2yds4bav9NUbtA0viiJY1r/gBEnEQrw== Xref: csiph.com comp.lang.javascript:26495 John Harris wrote: > On Wed, 07 Jan 2015 17:01:05 +0100, "Christoph M. Becker" > wrote: > >> John Harris wrote: >> >>> It is obvious that you, Thomas, are not familiar with C++ V-tables. >>> They do exactly the same job as an ECMAScript prototype chain but are >>> far more efficient and cannot be altered by the user code, or even >>> accessed. >>> >>> V-tables are the obvious data structures to do the job but the >>> Standard allows compilers to use any means they wish. A compiler could >>> even use ECMAScript prototype chains, but wouldn't as it would be too >>> slow and unnecessarily complicated. >> >> I consider it rather unlikely that an ECMAScript implementation uses >> vtables for property lookup; more likely they might use hash tables >> caches to avoid repeated traversal of the prototype chain. >> >> However, claiming or even assuming is somewhat inappropriate for a >> technical newsgroup -- a proof would be preferable. > > I'm afraid you've misread what I wrote. I said that a C++ compiler is > permitted to use prototype chains if it wishes to (but it never will > wish to). Indeed, I've misread your post. Thanks for the clarification. > I did not say anything about ECMAScript implementations. Indeed, > V-tables are fixed arrays that rely on variables having fixed names > and on no change by the program so are very unsuitable. ACK -- Christoph M. Becker