aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2024-06-18 22:07:00 -0700
committeriximeow <me@iximeow.net>2024-06-18 22:07:00 -0700
commitcbdfa8402603e3a756b10d1527f1dc3c594f57cd (patch)
tree6f5272d65d0165b852be93373e62d3e753a4994a
parent2475794b7042fea9e8e3d637a5b3787a0939e89e (diff)
inline the write u8/u32 helpers, lets see what that does
-rw-r--r--src/long_mode/display.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs
index 4f80950..1d14ff8 100644
--- a/src/long_mode/display.rs
+++ b/src/long_mode/display.rs
@@ -740,6 +740,7 @@ impl DisplaySink for alloc::string::String {
/// this is provided for optimization opportunities when the formatted integer can be written
/// directly to the sink (rather than formatted to an intermediate buffer and output as a
/// followup step)
+ #[inline(always)]
fn write_u8(&mut self, mut v: u8) -> Result<(), core::fmt::Error> {
// we can fairly easily predict the size of a formatted string here with lzcnt, which also
// means we can write directly into the correct offsets of the output string.
@@ -803,6 +804,7 @@ impl DisplaySink for alloc::string::String {
/// this is provided for optimization opportunities when the formatted integer can be written
/// directly to the sink (rather than formatted to an intermediate buffer and output as a
/// followup step)
+ #[inline(always)]
fn write_u32(&mut self, mut v: u32) -> Result<(), core::fmt::Error> {
// we can fairly easily predict the size of a formatted string here with lzcnt, which also
// means we can write directly into the correct offsets of the output string.
@@ -1073,6 +1075,7 @@ impl DisplaySink for BigEnoughString {
/// this is provided for optimization opportunities when the formatted integer can be written
/// directly to the sink (rather than formatted to an intermediate buffer and output as a
/// followup step)
+ #[inline(always)]
fn write_u8(&mut self, mut v: u8) -> Result<(), core::fmt::Error> {
// we can fairly easily predict the size of a formatted string here with lzcnt, which also
// means we can write directly into the correct offsets of the output string.
@@ -1133,6 +1136,7 @@ impl DisplaySink for BigEnoughString {
/// this is provided for optimization opportunities when the formatted integer can be written
/// directly to the sink (rather than formatted to an intermediate buffer and output as a
/// followup step)
+ #[inline(always)]
fn write_u32(&mut self, mut v: u32) -> Result<(), core::fmt::Error> {
// we can fairly easily predict the size of a formatted string here with lzcnt, which also
// means we can write directly into the correct offsets of the output string.