Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
213b0ff1
Commit
213b0ff1
authored
Dec 28, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added speed information about the pipe and bridge
parent
2c1a2f4e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
network.xml
docs/docs/network.xml
+22
-0
other.xml
docs/docs/other.xml
+17
-2
No files found.
docs/docs/network.xml
View file @
213b0ff1
...
@@ -73,6 +73,28 @@
...
@@ -73,6 +73,28 @@
<description>
<description>
This object is a tool for bridging a
<a
href=
"other.html#pipe"
>
pipe
</a>
object between
This object is a tool for bridging a
<a
href=
"other.html#pipe"
>
pipe
</a>
object between
two network connected applications.
two network connected applications.
<p>
The bridge object is designed to link two pipes together as efficiently as
possible. To demonstrate its speed, I ran two experiments where a bridge was
used to connect a desktop PC to a laptop, both running Ubuntu 12.04 and
connected via gigabit ethernet. The first experiment is to test its bulk
transfer speed while the second experiment measures how many separate objects
the bridge can transfer each second.
</p>
<p>
In the first experiment, 1-megapixel images, represented with
<tt>
array
<
rgb_pixel
>
</tt>
objects, were sent. The transfer rate was
112 megabytes/second, saturating the gigabit ethernet link. The second
experiment used a
<tt>
pipe
<
char
>
</tt>
and
<tt>
bridge
</tt>
to send individual
<tt>
char
</tt>
variables over the network. In this experiment, I was able to
send 3.2 million objects a second (i.e. the receiving end was getting a char
back from pipe::dequeue() 3.2 million times each second).
</p>
<p>
For reference, these experiments were carried out on a desktop with a 2.67GHz
Intel Core-i7 CPU and a laptop with a 2.20GHz Intel Core-i7 CPU.
</p>
</description>
</description>
<examples>
<examples>
<example>
bridge_ex.cpp.html
</example>
<example>
bridge_ex.cpp.html
</example>
...
...
docs/docs/other.xml
View file @
213b0ff1
...
@@ -331,8 +331,23 @@
...
@@ -331,8 +331,23 @@
<file>
dlib/pipe.h
</file>
<file>
dlib/pipe.h
</file>
<spec_file>
dlib/pipe/pipe_kernel_abstract.h
</spec_file>
<spec_file>
dlib/pipe/pipe_kernel_abstract.h
</spec_file>
<description>
<description>
This is a first in first out queue with a fixed maximum size containing items
This is a first in first out queue with a fixed maximum size.
of type T. It is suitable for passing objects between threads.
It is suitable for passing objects between threads.
<p>
This object is optimized for speed, therefore, it uses
global
<tt>
swap()
</tt>
to create a zero-copy method for moving objects
around. For example, on a computer running Ubuntu 12.04 with
a 2.67GHz Intel i7 920 CPU it is possible to pass over 4.4
million
<tt>
std::vector
<
int
>
</tt>
objects a second between two
threads. This is regardless of the number of ints in the
<tt>
std::vector
</tt>
objects. In particular, this test was done with 100,000
ints in each
<tt>
std::vector
</tt>
.
</p>
<p>
Finally, note that you can use the pipe as an efficient method to pass
messages between two networked computers by using the
<a
href=
"network.html#bridge"
>
bridge
</a>
.
</p>
</description>
</description>
<examples>
<examples>
...
...
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