<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - Function.prototype.bind: Bound functions must use the [[Prototype]] of their target function instead of Function.prototype"
   href="https://bugs.webkit.org/show_bug.cgi?id=145605#c25">Comment # 25</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - Function.prototype.bind: Bound functions must use the [[Prototype]] of their target function instead of Function.prototype"
   href="https://bugs.webkit.org/show_bug.cgi?id=145605">bug 145605</a>
              from <span class="vcard"><a class="email" href="mailto:ggaren&#64;apple.com" title="Geoffrey Garen &lt;ggaren&#64;apple.com&gt;"> <span class="fn">Geoffrey Garen</span></a>
</span></b>
        <pre><span class="quote">&gt; &#64;Geoffrey:
&gt; 
&gt; Isn't the structure system designed to create one empty object structure per
&gt; prototype? If so, how would the number of structures being allocated cause
&gt; this regression?</span >

When you call Structure::create (via JSBoundFunction::createStucture), you allocate a structure. There is no default mechanism to avoid or de-duplicate that allocation. Allocation takes time and increases GC pressure.

<span class="quote">&gt; And I don't see the relevance of the `prototype` property to a `bind` call?</span >

You're right: I misspoke when I mentioned .prototype.

<span class="quote">&gt; If my above assumption re. structures is incorrect, would it not make more
&gt; sense to check whether [[Prototype]] is not Function.prototype, and only
&gt; then create a new structure.</span >

Yes, I think that's the right short-term solution: Maintain the per-global-object bound function structure, and only allocate a new structure if the per-global-object structure will not do.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>