Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ee5b09ba
Commit
ee5b09ba
authored
Jul 27, 2008
by
Bradley C. Kuszmaul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
up
git-svn-id:
file:///svn/tokudb@5358
c7de825b-a66e-492c-adef-691d508d4ae1
parent
06634853
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
1 deletion
+32
-1
newbrt/hash-benchmarks/hash-benchmark.c
newbrt/hash-benchmarks/hash-benchmark.c
+32
-1
No files found.
newbrt/hash-benchmarks/hash-benchmark.c
View file @
ee5b09ba
...
...
@@ -887,10 +887,41 @@ void l1764_init(struct l1764 *l) {
l
->
input
=
0
;
l
->
n_input_bytes
=
0
;
}
void
l1764_add
(
struct
l1764
*
l
,
const
void
*
vbuf
,
int
len
)
{
inline
void
l1764_add
(
struct
l1764
*
l
,
const
void
*
vbuf
,
int
len
)
{
if
(
PRINT
)
printf
(
"%d: n_input_bytes=%d len=%d
\n
"
,
__LINE__
,
l
->
n_input_bytes
,
len
);
int
n_input_bytes
=
l
->
n_input_bytes
;
const
unsigned
char
*
cbuf
=
vbuf
;
// Special case short inputs
if
(
len
==
1
)
{
u_int64_t
input
=
l
->
input
|
((
u_int64_t
)(
*
cbuf
))
<<
(
8
*
n_input_bytes
);
n_input_bytes
++
;
if
(
n_input_bytes
==
8
)
{
l
->
sum
=
l
->
sum
*
17
+
input
;
l
->
n_input_bytes
=
0
;
l
->
input
=
0
;
}
else
{
l
->
input
=
input
;
l
->
n_input_bytes
=
n_input_bytes
;
}
return
;
}
else
if
(
len
==
2
)
{
u_int64_t
input
=
l
->
input
;
u_int64_t
thisv
=
((
u_int64_t
)(
*
(
u_int16_t
*
)
cbuf
));
if
(
n_input_bytes
==
7
)
{
l
->
sum
=
l
->
sum
*
17
+
(
input
|
(
thisv
<<
(
8
*
7
)));
l
->
input
=
thisv
>>
8
;
l
->
n_input_bytes
=
1
;
}
else
if
(
n_input_bytes
==
6
)
{
l
->
sum
=
l
->
sum
*
17
+
(
input
|
(
thisv
<<
(
8
*
6
)));
l
->
input
=
0
;
l
->
n_input_bytes
=
0
;
}
else
{
l
->
input
=
input
|
(
thisv
<<
(
8
*
n_input_bytes
));
l
->
n_input_bytes
+=
2
;
}
return
;
}
u_int64_t
sum
;
//assert(len>=0);
if
(
n_input_bytes
)
{
...
...
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