From 53a3004db78103e8738e8b73040d1b18a3fdc7dd Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Fri, 22 Dec 2023 08:17:32 +0100 Subject: Further clarifications on small lists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 4ef6789..0210740 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,13 @@ it added a bunch of code that was unrelated to the challenge itself. Hence, I extracted the logic into this library and tuned things down from the lessons I learnt along the way. +Moreover, you could also use this library to keep track of small lists, but you +have to keep in mind that pointer arithmetics and bound checks can hinder +performance. In other words, if you have a small list (less or equal than what +it can be addressed with an 8-bit index), then it's not worth the trouble: there +are other more performant ways to achieve the same thing. In short, this library +is useful only when indexing this list requires 16-bit arithmetic. + It's all pretty simple but being assembly code it comes with some gotchas that you need to be aware of. -- cgit v1.2.3