From b4466cf0d4afedd61be7c6c591ffbf98d46b1d05 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 6 Nov 2019 21:54:41 +0100 Subject: stream: remove inline buffer optimization Was probably worthless, and I can't measure a difference anymore (I used to be able and it still seemed worth doing so back then). When the default buffer size is enlarged in the next commit, the inline buffer probably won't even be useful in theory, because the data will rarely be on the same page as the other stream fields. It surely makes the inline buffer seem like a ridiculous micro-optimization. Farewell... --- stream/stream.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'stream/stream.h') diff --git a/stream/stream.h b/stream/stream.h index 7437e1c86b..7dbcd833a4 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -31,8 +31,6 @@ // Minimum guaranteed buffer and seek-back size. For any reads <= of this size, // it's guaranteed that you can seek back by <= of this size again. #define STREAM_BUFFER_SIZE 2048 -// (Half of this is typically reserved for seeking back.) -#define STREAM_FIXED_BUFFER_SIZE (STREAM_BUFFER_SIZE * 2) // stream->mode #define STREAM_READ 0 @@ -174,8 +172,6 @@ typedef struct stream { unsigned int buffer_mask; // buffer_size-1, where buffer_size == 2**n uint8_t *buffer; - - uint8_t buffer_inline[STREAM_FIXED_BUFFER_SIZE]; } stream_t; // Non-inline version with stream_read_char(). -- cgit v1.2.3