Skip to content

[fast_io] update - #264

Merged
MacroModel merged 45 commits into
UlteSoft:masterfrom
MacroModel:master
Jul 10, 2026
Merged

[fast_io] update#264
MacroModel merged 45 commits into
UlteSoft:masterfrom
MacroModel:master

Conversation

@MacroModel

Copy link
Copy Markdown
Member

No description provided.

MacroModel added 30 commits July 7, 2026 12:03
…ormance

- Simplified conditional structures in `print_freestanding_cxx20.h` to enhance readability and maintainability.
- Streamlined buffer management and error handling in print functions, ensuring consistent behavior across different scenarios.
- Updated comments and documentation to clarify the purpose of changes and improve user understanding of the print control mechanisms.
- Introduced new template functions `output_stream_ref_define` and `input_stream_ref_define` for `basic_general_io_lockable_ref` types, enhancing the handling of output and input streams.
- Updated existing functions to support these new definitions, improving consistency and usability across the fast_io library.
- Enhanced overall clarity and maintainability of the code by ensuring proper handling of lockable types in stream operations.
- Introduced a new `custom.h` header for user-editable stack buffer size settings, allowing customization of the default maximum bytes for stack-based print operations.
- Refactored existing stack buffer management functions to utilize a template-based approach for stack policies, improving flexibility and type safety.
- Updated print-related functions to support the new stack policy mechanism, ensuring consistent behavior across different configurations.
- Enhanced documentation to clarify the new features and their usage, aiding user understanding of stack buffer management in fast_io.
- Updated `fast_io_core.h` to include `traits.h` and `impl.h`, enhancing the organization of header dependencies.
- Removed the `cond.h` and `width.h` files from the `fast_io_freestanding_impl` directory, streamlining the codebase by eliminating unused components.
- Adjusted related includes in `fast_io_freestanding.h` to reflect the removal of obsolete files, improving overall clarity and maintainability of the fast_io library.
- Introduced `#if 0` guards in `cond.h` and `width.h` to temporarily disable sections of code, improving maintainability and allowing for easier future modifications.
- This change enhances the organization of the codebase by clearly indicating which parts are currently inactive while preserving them for potential future use.
- Introduced several new template functions for precise total size calculation and unchecked emission in `print_freestanding_cxx20.h`, enhancing the flexibility of print operations.
- Implemented a coalescing mechanism to optimize buffer usage during print operations, improving performance and reducing unnecessary allocations.
- Updated existing print logic to utilize the new functions, ensuring consistent behavior and better resource management across the fast_io library.
- Added new template functions for full output coalescing thresholds in `print_freestanding_cxx20.h` and `posix.h`, optimizing buffer management during print operations.
- Introduced semantic checks for precise concatenation in `concat_general.h`, improving the handling of print arguments and ensuring efficient memory usage.
- Updated existing print logic to leverage the new coalescing and semantic functions, enhancing performance and consistency across the fast_io library.
…pecific defaults

- Enhanced the `custom.h` header to provide environment-specific default values for stack-based print operations, improving flexibility and performance.
- Updated documentation to clarify the new default values based on target environments, ensuring users can effectively customize stack buffer sizes.
- Refactored the `print_stack_buffer_default_max_bytes` structure to utilize conditional compilation for better adaptability across different platforms.
- Updated the `print_stack_buffer_default_max_bytes` structure to introduce a clearer distinction between the default value and the user-configurable value, enhancing code readability.
- Added documentation to guide users on customizing the default maximum bytes for stack-based print materialization, improving usability and flexibility in stack buffer management.
- Introduced several new template functions for handling print semantics, including common factor checks and unchecked emission for pack elements in `print_freestanding_cxx20.h`.
- Implemented a mechanism for comparing elements within packs, improving the flexibility and efficiency of print operations.
- Enhanced existing functions to utilize the new semantic checks, ensuring consistent behavior and better resource management across the fast_io library.
- Updated the conditional compilation for `iec559_traits<__float80>` to ensure proper handling based on the presence and values of long double characteristics.
- Improved code clarity by refining the conditions under which the specialization is defined, enhancing compatibility across different platforms.
- Introduced new structures and functions to improve the handling of contiguous scatter and reserve runs in `print_freestanding_cxx20.h`.
- Added detailed documentation for new template functions that scan parameter packs for leading contiguous scatter/reserve-friendly print runs.
- Improved the logic for managing null outputs and dynamic reserves, ensuring more efficient and accurate print operations across the fast_io library.
- Added detailed comments explaining the rationale for force-inlining various functions in `print_freestanding_cxx20.h`, improving code clarity and maintainability.
- The updates focus on optimizing performance by ensuring that critical functions are inlined, reducing call overhead and enhancing execution efficiency during print operations.
- Improved documentation within `print_freestanding_cxx20.h` by adding comments that clarify the decision-making process for buffer management during print operations.
- The updates focus on explaining the conditions under which different output strategies are employed, such as direct output, stack materialization, and dynamic storage, enhancing code readability and maintainability.
- Added new template specializations for `sized_range_view_t` and `range_view_t` to support various scatter types, improving flexibility in handling input iterators.
- Introduced constraints to ensure proper type handling, enhancing the robustness of the range view implementations in the fast_io library.
- Updated the handling of character code units to clearly separate them from numeric integrals, ensuring that default printing does not mistakenly format characters as numbers.
- Renamed the `cintegral` function to `char_as_integer` for better clarity in its purpose.
- Added comments to clarify the rationale behind the separation of character code units from numeric types, enhancing code readability and maintainability.
- Introduced new floating precision options, including `significant_preserve_tailing_zero` and `fractional_preserve_tailing_zero`, to improve control over floating-point formatting.
- Updated existing functions to utilize the new precision options, enhancing the flexibility and accuracy of floating-point output.
- Refactored related logic to ensure proper handling of precision modes, improving code clarity and maintainability.
…s in fast_io

- Improved the parsing logic for decimal and hexadecimal floating-point numbers, adding support for special cases and overflow handling.
- Introduced new utility functions for checking digit validity and handling non-zero digits in hexadecimal formats.
- Refactored existing functions to enhance clarity and maintainability, ensuring robust handling of edge cases in floating-point parsing.
- Updated the floating-point context management to better accommodate special values and exponent handling, improving overall parsing accuracy.
- Introduced new structures and functions to improve the handling of exact digits and bigint operations in decimal floating-point parsing.
- Refactored hexfloat parsing logic to streamline the handling of hexadecimal digits and improve efficiency.
- Enhanced state management for both decfloat and hexfloat to better track significant digits and truncation conditions, ensuring more accurate parsing results.
- Updated existing functions to utilize new capabilities, improving overall performance and maintainability of floating-point and hexadecimal parsing.
- Updated the logic for handling overflow values in decimal floating-point parsing to improve clarity and maintainability.
- Introduced a boolean flag to streamline the conditions under which maximum finite values are assigned, enhancing the readability of the code.
- This change aims to ensure more accurate parsing results while maintaining the overall performance of the fast_io library.
- Introduced new functions for handling floating-point operations, including bigint multiplication and addition, improving performance and accuracy in decimal and hexadecimal parsing.
- Added support for extended mantissa structures and adjusted significand calculations, enhancing the precision of floating-point representations.
- Refactored existing logic to streamline the parsing process and improve maintainability, ensuring robust handling of edge cases in floating-point formats.
…rmance

- Simplified the calculation of significand digit limits in decfloat by removing unnecessary lambda functions, enhancing readability.
- Introduced new utility functions for clearing and copying bigint structures, improving code maintainability and reducing redundancy.
- Added force-inlining attributes to critical parsing functions in both decfloat and hexfloat, optimizing performance during floating-point operations.
- Added `scan_decfloat_append_exact_ascii8_digits` and its slow variant to improve the efficiency of appending exact digits in decimal floating-point parsing.
- Introduced `scan_decfloat_bigint_shift_left_inplace` for in-place shifting of bigint structures, enhancing performance and reducing memory overhead.
- Refactored existing logic to streamline the handling of significand calculations, ensuring better performance and maintainability in floating-point operations.
- Introduced new structures and functions for bounded size checks in print semantics, improving the handling of various manipulators and types.
- Refactored existing print functions to accommodate dynamic reserve and width manipulations, enhancing performance and maintainability.
- Updated the logic for width placement and padding in print operations, ensuring more accurate output formatting and better handling of edge cases.
- Introduced new structures and functions for handling bfloat16 high fallback scenarios in floating-point operations.
- Enhanced the dragonbox implementation with fallback mechanisms for nearest-to-even rounding, improving accuracy for specific exponent and mantissa combinations.
- Refactored existing functions to integrate the new fallback logic, ensuring better performance and maintainability in floating-point calculations.
MacroModel added 15 commits July 8, 2026 21:34
- Refactored rounding conditions in decfloat and roundtrip implementations to improve clarity and accuracy.
- Introduced additional checks for mantissa adjustments based on rounding rules, ensuring correct handling of edge cases.
- Updated the logic for handling zero significands and exponent limits, enhancing overall performance and maintainability in floating-point operations.
- Introduced new concepts for handling EOF scenarios in context scanning, allowing for rewind capabilities when a partial prefix is invalid.
- Added functions to manage EOF rewind size, improving the robustness of scanning operations.
- Updated existing scanning logic to incorporate new EOF handling mechanisms, enhancing overall performance and maintainability in parsing operations.
- Updated floating precision enumerations to correct naming conventions for trailing zero preservation.
- Enhanced print semantic handling by introducing static assertions for raw character and pointer types, improving type safety during print operations.
- Added new utility functions for checking raw print arguments, ensuring better handling of character and pointer types in print functions.
- Refactored existing print functions to incorporate new static assertions, enhancing maintainability and clarity in error handling.
- Added comments to clarify the behavior of pointer printing functions, distinguishing between object pointers, function pointers, and member pointers.
- Updated the implementation to utilize the new pointer printing functions for better clarity and consistency in output.
- Introduced static assertions for raw function and member pointer types to improve type safety during print operations.
- Updated print functions to utilize new type checks for forwarded arguments, enhancing type safety and clarity in bounded and precise coalescing operations.
- Introduced additional logic for managing stack buffer limits, improving performance and memory efficiency during print operations.
- Enhanced the handling of floating-point rounding conditions in decfloat, ensuring accurate rounding behavior based on specified manipulator settings.
- Introduced new functions for scanning hexadecimal floating-point exponents, improving parsing accuracy and handling of edge cases.
- Added logic to manage scatter-printable arguments in print operations, optimizing memory usage and performance.
- Enhanced existing scanning functions to support extended parsing scenarios, ensuring robust handling of special cases in floating-point contexts.
- Added comments to clarify the behavior and rationale behind scatter fallback and full-output coalescing thresholds.
- Adjusted the full-output coalescing threshold to 2048 bytes, optimizing performance for larger payloads while maintaining efficiency for smaller runs.
- Enhanced documentation to provide insights into the performance implications of these thresholds based on benchmarking results.
…ast_io

- Added functions to calculate total size of scatter chains and copy them to buffers, improving memory management during concatenation.
- Introduced a new implementation for handling scatter-printable arguments in concatenation, optimizing performance and memory usage.
- Enhanced existing concatenation functions to support the new scatter handling logic, ensuring robust and efficient string operations.
- Introduced new functions for efficient copying of small scatter chains, optimizing memory usage during concatenation operations.
- Enhanced existing scatter handling logic to support direct and generic implementations based on argument types, improving performance.
- Added functions for parsing ASCII hexadecimal digits and validating hexadecimal word formats, enhancing the robustness of integer scanning operations.
- Updated existing parsing functions to utilize new mechanisms for handling large data chunks, improving efficiency in scanning operations.
- Introduced the `small_scatter_coalesce_threshold_stream` concept to optimize stream handling for small scatter repacking.
- Implemented `print_small_scatter_repack_size` and related functions to enhance memory efficiency during scatter write operations.
- Updated POSIX platform support with a new `small_scatter_coalesce_threshold` function to manage small scatter repacking effectively.
- Enhanced existing scatter handling logic to improve performance and reduce unnecessary memory copies during output operations.
- Updated the `scatter_fallback_full_output_threshold`, `full_output_coalesce_threshold`, and `small_scatter_coalesce_threshold` functions to return zero, optimizing performance by leveraging native POSIX `writev` capabilities.
- Removed conservative fallback logic and adjusted comments to reflect the new approach, enhancing clarity on performance implications for scatter operations.
- Ensured that small scatter repacking remains disabled by default, allowing for more efficient direct writes in POSIX environments.
- Updated the implementation of integral printing functions to utilize a more efficient power calculation method, enhancing performance.
- Improved handling of high digit printing based on the base, ensuring correct character representation for bases greater than 10.
- Introduced a new function to check for potential extension of decimal float exponent prefixes, improving parsing accuracy.
- Enhanced hex float precision handling by refining conditions for total precision adjustments, optimizing output formatting.
- Updated the `scatter_fallback_full_output_threshold` and `full_output_coalesce_threshold` functions to improve performance by adjusting the thresholds and refining comments for clarity.
- Set the `full_output_coalesce_threshold` to 2048 bytes to optimize output for larger payloads while ensuring efficient handling of smaller runs.
- Enhanced documentation to reflect the new approach and its implications for POSIX environments.
- Introduced new functions to manage small scatter repacking, including `print_small_scatter_repack_size` and `print_scatter_write_all_bytes_try_repack_small`, optimizing memory usage during output operations.
- Improved documentation with detailed comments explaining the behavior and thresholds for small scatter repacking, ensuring clarity on performance implications.
- Enhanced logic to conditionally repack small byte scatter segments, allowing for more efficient output handling based on stream capabilities.
- Introduced new templates and structures to improve the handling of concatenation conditions, allowing for more precise control over output based on argument types.
- Added functions to compute static bounded sizes for print operations, optimizing memory usage and ensuring accurate size calculations during semantic printing.
- Enhanced existing logic to support top-level conditions in concatenation, improving the efficiency of output operations and reducing unnecessary complexity.
- Updated documentation to clarify the new functionalities and their implications for performance in various scenarios.
@MacroModel
MacroModel merged commit f86181d into UlteSoft:master Jul 10, 2026
4 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant