[Mono-dev] Re. PR 1501: Mark hot functions in the runtime.

Jonathan Purdy jonathan.purdy at xamarin.com
Tue Jan 27 01:45:08 UTC 2015


In this pull request[1] I add GCC/Clang’s “__attribute__((hot))” to various
hot GC functions. This increases code size a small amount, and makes a very
small improvement in performance—see the attached graph. I think actually
marking some slow-path/error-handling functions as “__attribute__((cold))”
would do more to improve branch prediction in cases where we haven’t marked
things as “G_UNLIKELY”.

[1]: https://github.com/mono/mono/pull/1501
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20150126/3947b8a1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graph.svg
Type: image/svg+xml
Size: 42717 bytes
Desc: not available
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20150126/3947b8a1/attachment-0001.svg>


More information about the Mono-devel-list mailing list