]> Kevux Git Server - fll/commit
Bugfix: Performance is slow due to process signal checks.
authorKevin Day <thekevinday@gmail.com>
Thu, 9 Dec 2021 05:21:57 +0000 (23:21 -0600)
committerKevin Day <thekevinday@gmail.com>
Thu, 9 Dec 2021 05:21:57 +0000 (23:21 -0600)
commitb8db13653cf389f14b944d2cc03ec17b183ee74a
treed8f272388ed91a8589cb8e619197afb4fd15f8c0
parent8b5d185d80fda982ad26ec2e50b5c3771d34b25a
Bugfix: Performance is slow due to process signal checks.

The cost of the system call for checking if a signal is received is more expensive than I have previously imagined.
I also was not sure where I should handle the signals and I arbitrarily put them inside loops.

Reduce the number of checks.
Reduce the number of the system call to check the process signal using modulus math.

The performance difference is most notable when using the byte_dump program.

This focuses on solving the immediate performance bug.
I still have not done any extensive performance investigations and I expect this to still have significant room for improvement.
41 files changed:
level_3/byte_dump/c/byte_dump.h
level_3/byte_dump/c/private-byte_dump.c
level_3/fake/c/fake.c
level_3/fake/c/fake.h
level_3/fake/c/private-build.c
level_3/fake/c/private-fake.c
level_3/fake/c/private-make.c
level_3/fake/c/private-skeleton.c
level_3/firewall/c/firewall.h
level_3/firewall/c/private-firewall.c
level_3/fss_basic_list_read/c/fss_basic_list_read.h
level_3/fss_basic_list_write/c/fss_basic_list_write.h
level_3/fss_basic_read/c/fss_basic_read.h
level_3/fss_basic_write/c/fss_basic_write.h
level_3/fss_embedded_list_read/c/fss_embedded_list_read.h
level_3/fss_embedded_list_write/c/fss_embedded_list_write.h
level_3/fss_extended_list_read/c/fss_extended_list_read.h
level_3/fss_extended_list_write/c/fss_extended_list_write.h
level_3/fss_extended_read/c/fss_extended_read.c
level_3/fss_extended_read/c/fss_extended_read.h
level_3/fss_extended_read/c/private-fss_extended_read.c
level_3/fss_extended_write/c/fss_extended_write.c
level_3/fss_extended_write/c/fss_extended_write.h
level_3/fss_extended_write/c/private-fss_extended_write.c
level_3/fss_identify/c/fss_identify.c
level_3/fss_identify/c/fss_identify.h
level_3/fss_identify/c/private-fss_identify.c
level_3/fss_status_code/c/fss_status_code.c
level_3/fss_status_code/c/fss_status_code.h
level_3/iki_read/c/iki_read.c
level_3/iki_read/c/iki_read.h
level_3/iki_read/c/private-iki_read.c
level_3/iki_write/c/iki_write.c
level_3/iki_write/c/iki_write.h
level_3/status_code/c/status_code.c
level_3/status_code/c/status_code.h
level_3/utf8/c/private-utf8.c
level_3/utf8/c/private-utf8_binary.c
level_3/utf8/c/private-utf8_codepoint.c
level_3/utf8/c/utf8.c
level_3/utf8/c/utf8.h