From: Eric Wong <normalperson@yhbt.net>
To: sox-devel@lists.sourceforge.net
Cc: Mans Rullgard <mans@mansr.com>
Subject: Re: [PATCH 4/6] Add macros for increasing data alignment
Date: Sun, 20 Dec 2015 12:41:30 +0000 [thread overview]
Message-ID: <20151220124130.GA8404@dcvr.yhbt.net> (raw)
In-Reply-To: <1442412990-20764-4-git-send-email-mans@mansr.com>
Mans Rullgard <mans@mansr.com> wrote:
> Also check for the aligned_alloc() function and alias to Microsoft's
> _aligned_malloc() if necessary.
How much does aligned_alloc help performance for you (and with which
settings)? I'm on an older system with only memalign and
posix_memalign, and trying to enable it didn't change performance with
"--multi-thread --buffer=131072" on a 4-core AMD Phenom II X4 945
--- a/src/util.h
+++ b/src/util.h
@@ -194,8 +194,13 @@
#define LSX_ALIGN(n)
#endif
+#define HAVE_MEMALIGN
+
#ifdef HAVE_ALIGNED_ALLOC
#define aligned_free(p) free(p)
+#elif defined(HAVE_MEMALIGN)
+ #define aligned_alloc(a, s) memalign(a, s)
+ #define aligned_free(p) free(p)
#elif defined _MSC_VER
#define aligned_alloc(a, s) _aligned_malloc(s, a)
#define aligned_free(p) _aligned_free(p)
------------------------------------------------------------------------------
next prev parent reply other threads:[~2015-12-20 12:41 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 14:16 [PATCH 1/6] Add SOX_ENCODING_DSD Mans Rullgard
2015-09-16 14:16 ` [PATCH 2/6] Add DSF file support Mans Rullgard
2015-09-16 14:16 ` [PATCH 3/6] Add support for reading DSDIFF files Mans Rullgard
2015-09-16 14:16 ` [PATCH 4/6] Add macros for increasing data alignment Mans Rullgard
2015-12-20 12:41 ` Eric Wong [this message]
2015-12-20 13:54 ` Måns Rullgård
2015-12-21 10:55 ` Eric Wong
2015-12-21 11:37 ` Måns Rullgård
2015-12-21 18:33 ` Eric Wong
2015-12-21 18:37 ` Måns Rullgård
2015-09-16 14:16 ` [PATCH 5/6] Add a sigma-delta modulator for DSD encoding Mans Rullgard
2015-10-03 22:31 ` Eric Wong
2015-10-03 22:39 ` Måns Rullgård
2015-09-16 14:16 ` [PATCH 6/6] Add DSD over PCM (dop) effect Mans Rullgard
2015-12-19 12:09 ` Eric Wong
2015-12-19 12:14 ` Måns Rullgård
2015-12-20 5:04 ` Eric Wong
2015-12-20 13:44 ` Måns Rullgård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.sourceforge.net/lists/listinfo/sox-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151220124130.GA8404@dcvr.yhbt.net \
--to=sox-devel@lists.sourceforge.net \
--cc=mans@mansr.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/sox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).