Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nettle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
5
Merge Requests
5
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Nettle
nettle
Commits
5ce02c32
Commit
5ce02c32
authored
Oct 23, 2014
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Two-way unrolling of aligned memxor3.
parent
b6a47ff5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
ChangeLog
ChangeLog
+1
-0
memxor.c
memxor.c
+11
-2
No files found.
ChangeLog
View file @
5ce02c32
...
...
@@ -2,6 +2,7 @@
* memxor.c (memxor_common_alignment, memxor_different_alignment)
(memxor): Change loop order, iterate from the end.
(memxor3_common_alignment): Unroll twice.
* examples/nettle-benchmark.c (time_memxor): Allocate buffers as
arrays of unsigned long, for more reliable alignment.
...
...
memxor.c
View file @
5ce02c32
...
...
@@ -166,8 +166,17 @@ memxor3_common_alignment (word_t *dst,
const
word_t
*
a
,
const
word_t
*
b
,
size_t
n
)
{
/* FIXME: Require n > 0? */
while
(
n
--
>
0
)
dst
[
n
]
=
a
[
n
]
^
b
[
n
];
if
(
n
&
1
)
{
n
--
;
dst
[
n
]
=
a
[
n
]
^
b
[
n
];
}
while
(
n
>
0
)
{
n
-=
2
;
dst
[
n
+
1
]
=
a
[
n
+
1
]
^
b
[
n
+
1
];
dst
[
n
]
=
a
[
n
]
^
b
[
n
];
}
}
static
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment