]> Kevux Git Server - fll/commit
Progress: Continue print development.
authorKevin Day <thekevinday@gmail.com>
Sun, 1 Aug 2021 04:24:53 +0000 (23:24 -0500)
committerKevin Day <thekevinday@gmail.com>
Sun, 1 Aug 2021 04:39:47 +0000 (23:39 -0500)
commit649432d206f8d6b364039c2a04d7d120961e96f1
treeb9a6fa6bb770279d848e95769a1e5ab4e4c974ad
parentb9630fc076319f8d54b1f2c6a0a739d43fcf6c7c
Progress: Continue print development.

I've noticed that the performance can be quite poor in the custom fprintf functions.
Investigating this seems to be for several reasons:
1) No serious optimization developed into the logic as of yet.
2) The libc functions have serious optimization.
3) GCC/Clang are not properly identifying the register for unoptimized compilation.
4) I believe the libc functions are also parsing the data in a loop.

Some very basic optimizations are implemented:
1) Utilize "-O2" in every config by default to encourage the compiler to properly detect and set register (huge performance gained).
2) Use libc functions like strnlen() and fwrite() more often (more work to do in this regard).
3) Use grouping in the if..then.. logic to reduce the number of comparisons.

Fix bug where the number '11' is not being converted due to a typo.
Fix bug where an uppercase 'E' is printed when it should be a lower case 'e'.

There is no "end of enquiry".
Replace "end of enquiry" with "enquiry" because there is no "end of enquiry".
Organize print sequences and add (and utilize) a control sequence character map to avoid multiple if..then.. logic.

Re-organize the format flags, changing some entirely.
I decided not to so closely follow fprintf() functions and instead make things a little more consistent.
For example, "ul" and "ull" exist but the signed opposite is "l" and "ll".
This could instead be "ul" and "ull" as unsigned version of "il" and "ill".
Most of the FLL project is explicit about byte sizes, and so do the same with the format flags.

There is still a lot more work to do, but this is starting to stabilize a little.
67 files changed:
level_0/f_account/data/build/settings
level_0/f_capability/data/build/settings
level_0/f_color/data/build/settings
level_0/f_console/data/build/settings
level_0/f_control_group/data/build/settings
level_0/f_conversion/c/private-conversion.c
level_0/f_conversion/data/build/settings
level_0/f_directory/data/build/settings
level_0/f_environment/data/build/settings
level_0/f_execute/data/build/settings
level_0/f_file/data/build/settings
level_0/f_fss/data/build/settings
level_0/f_iki/data/build/settings
level_0/f_limit/data/build/settings
level_0/f_memory/data/build/settings
level_0/f_path/data/build/settings
level_0/f_pipe/data/build/settings
level_0/f_print/c/print-common.c
level_0/f_print/c/print-common.h
level_0/f_print/c/print.c
level_0/f_print/c/print.h
level_0/f_print/c/private-print.c
level_0/f_print/c/private-print.h
level_0/f_print/data/build/settings
level_0/f_serialize/data/build/settings
level_0/f_signal/data/build/settings
level_0/f_socket/data/build/settings
level_0/f_status/data/build/settings
level_0/f_string/data/build/settings
level_0/f_thread/data/build/settings
level_0/f_type/data/build/settings
level_0/f_type_array/data/build/settings
level_0/f_utf/data/build/settings
level_1/fl_console/data/build/settings
level_1/fl_control_group/data/build/settings
level_1/fl_conversion/data/build/settings
level_1/fl_directory/data/build/settings
level_1/fl_environment/data/build/settings
level_1/fl_execute/data/build/settings
level_1/fl_fss/data/build/settings
level_1/fl_iki/data/build/settings
level_1/fl_print/c/print.c
level_1/fl_print/c/print.h
level_1/fl_print/c/private-print.c
level_1/fl_print/c/private-print.h
level_1/fl_print/data/build/settings
level_1/fl_signal/data/build/settings
level_1/fl_status/data/build/settings
level_1/fl_string/data/build/settings
level_1/fl_utf/data/build/settings
level_1/fl_utf_file/data/build/settings
level_2/fll_control_group/data/build/settings
level_2/fll_error/data/build/settings
level_2/fll_execute/data/build/settings
level_2/fll_file/data/build/settings
level_2/fll_fss/data/build/settings
level_2/fll_iki/data/build/settings
level_2/fll_path/data/build/settings
level_2/fll_print/c/print.c
level_2/fll_print/c/print.h
level_2/fll_print/data/build/settings
level_2/fll_program/data/build/settings
level_2/fll_status/data/build/settings
level_3/byte_dump/c/byte_dump.c
level_3/byte_dump/c/byte_dump.h
level_3/byte_dump/c/private-byte_dump.c
level_3/byte_dump/data/build/settings