From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mail-a.sr.ht; dkim=pass header.d=johnnyrichard.com header.i=@johnnyrichard.com Received: from out-181.mta0.migadu.com (out-181.mta0.migadu.com [IPv6:2001:41d0:1004:224b::b5]) by mail-a.sr.ht (Postfix) with ESMTPS id 5A85320279 for <~johnnyrichard/olang-devel@lists.sr.ht>; Thu, 22 Feb 2024 17:51:14 +0000 (UTC) Date: Thu, 22 Feb 2024 19:50:21 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1708624273; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qUGR8ILLKYtoMTGILABL19hbLzw4g4sXlCwP//Inekk=; b=xXiFOT7a56jk0ug4M2I5uFUaOzoPp4eouVGyNk3+HW2vEZKUaOKbdy9VXGu2cPsDA2NG0h 28J7ACTglVT1QwG1QMcRZJcr7bgbWtSXqrUbyll/KjvjfukLfYRhi/5bujm7yThzdq1cdi HXlHQqn9ds59CJ9jSvGLrWhM8GIIkeXojfI576VfdPncaBvq34J76wimg06wu4iqwtgu1y gwkJuvvopWKpj7xondl22SCH1zkz92kRehT5bWic0JBFNPv0Lw5lHKiGZZCri2pUO2ZJ+P tjNvNpoQKqbRtwRVNl/qQvAab+dgeyGGXvN5ZFkBTB+wmFZiFcDt48sRlvRWbg== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Johnny Richard To: Carlos Maniero Cc: ~johnnyrichard/olang-devel@lists.sr.ht Subject: Re: [PATCH olang v2] arena: optimization: make arena 8 bits aligned Message-ID: References: <20240221150911.3670778-1-carlos@maniero.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240221150911.3670778-1-carlos@maniero.me> X-Migadu-Flow: FLOW_OUT X-TUID: yjuiCAQZrI+6 On Wed, Feb 21, 2024 at 12:09:11PM -0300, Carlos Maniero wrote: > Subject: [PATCH olang v2] arena: optimization: make arena 8 bits aligned The patch title is say you are using 8 bits but the implementation is platform agnostic. Perhaps we could change it to: arena: ensure aligned memory access > This commit changes the pointers returned by *arena_alloc* to always be > system-word aligned. > > Non-aligned data structure could have a huge impact on performance. Take > the example bellow: We could also link to a document[1] that explains better the problem like the kernel one. [1]: https://www.kernel.org/doc/html/next/_sources/core-api/unaligned-memory-access.rst.txt > v2: > - There was I bug on the padding logic. I fixed it and tests were > added. Could you please reply to the first patch which bug you have encountered?