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

Appearance settings

Commit 4133c1f

Browse filesBrowse files
Avoid function call overhead of pg_popcount() in syslogger.c.
Instead of calling the pg_popcount() function for a single byte, we can look up the value in the pg_number_of_ones array. Discussion: https://postgr.es/m/20240401221117.GB2362108%40nathanxps13
1 parent 6687430 commit 4133c1f
Copy full SHA for 4133c1f

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎src/backend/postmaster/syslogger.c

Copy file name to clipboardExpand all lines: src/backend/postmaster/syslogger.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ process_pipe_input(char *logbuffer, int *bytes_in_logbuffer)
898898
if (p.nuls[0] == '\0' && p.nuls[1] == '\0' &&
899899
p.len > 0 && p.len <= PIPE_MAX_PAYLOAD &&
900900
p.pid != 0 &&
901-
pg_popcount((char *) &dest_flags, 1) == 1)
901+
pg_number_of_ones[dest_flags] == 1)
902902
{
903903
List *buffer_list;
904904
ListCell *cell;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.