Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit413c184

Browse files
committed
Refactor AllocSetAlloc(), separating hot and cold paths
Allocating from a free list or from a block which contains enough spacealready, we deem to be common code paths and want to optimize for those.Having to allocate a new block, either a normal block or a dedicated onefor a large allocation, we deem to be less common, therefore we classthat as "cold". Both cold paths require a malloc so are going to beslower as a result of that regardless.The main motivation here is to remove the calls to malloc() in the hotpath and because of this, the compiler is now free to not bother settingup the stack frame in AllocSetAlloc(), thus making the hot path muchcheaper.Author: Andres FreundReviewed-by: David RowleyDiscussion:https://postgr.es/m/20210719195950.gavgs6ujzmjfaiig@alap3.anarazel.de
1 parentafd8ef3 commit413c184

File tree

1 file changed

+268
-213
lines changed

1 file changed

+268
-213
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp