惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Securelist
SecWiki News
SecWiki News
Help Net Security
Help Net Security
Attack and Defense Labs
Attack and Defense Labs
L
LINUX DO - 最新话题
H
Heimdal Security Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
Hacker News - Newest:
Hacker News - Newest: "LLM"
Google DeepMind News
Google DeepMind News
V2EX - 技术
V2EX - 技术
Hacker News: Ask HN
Hacker News: Ask HN
O
OpenAI News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threat Research - Cisco Blogs
A
Arctic Wolf
Simon Willison's Weblog
Simon Willison's Weblog
P
Privacy & Cybersecurity Law Blog
T
Threatpost
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tor Project blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Spread Privacy
Spread Privacy
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
S
SegmentFault 最新的问题
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Palo Alto Networks Blog
C
CERT Recently Published Vulnerability Notes
PCI Perspectives
PCI Perspectives
AWS News Blog
AWS News Blog
IT之家
IT之家
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tailwind CSS Blog
M
MIT News - Artificial intelligence
V
Visual Studio Blog
Schneier on Security
Schneier on Security
T
The Exploit Database - CXSecurity.com
有赞技术团队
有赞技术团队
小众软件
小众软件
Google Online Security Blog
Google Online Security Blog
N
News | PayPal Newsroom
博客园_首页
T
Tenable Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
S
Secure Thoughts
I
Intezer

博客园 - catlog

曲终人不散 在Windows2000/XP的安全模式下,替换Gina 如何再Win2000/XP下,加入自己的认证? 是走的时候了 VC++ FAQ--VC和MFC的未来,还有Whidbey 如何在Win2000/xp下禁止某些硬件?比如说网卡,CD-ROM.. 明华的EKey 头晕,出个题目考考你 - catlog - 博客园 基于pkcs11的MS CSP的OpenSource实现 生活就是混下去。 用 WB Editor 连接 博客园 的全攻略 取得当前用户的权限(privileges) 一首词 如何用IPHelp取得网卡的详细信息 如何订阅OSR的新闻组? 1:0中国胜科威特 win98下如何控制登陆? 故土难离 Windows 2000的引导过程
令人吃惊的完成端口Copy速度!
catlog · 2004-02-27 · via 博客园 - catlog

今天把SDK的UnBufCpy的例子编译了一下,令人吃惊的是在我的机器(P42.66,512M Ram 80G7200HDD)上的Copy速度竟然是4085.11M/s

看了看代码,原来完成端口是如此的NB。

只是代码中的注释:

Abstract:

    This single-threaded version shows how to multiplex I/O to a number of files with
    a single thread. This is the most efficient mechanism if you do not need the
    asynchronous completion model that the dual-threaded version offers.

    Only one thread and one I/O completion port is used. The file handles for the
    source and destination file are both associated with the same port.  The
    thread starts off by posting a number of overlapped
    reads from the source file.  It then waits on the I/O completion port.
    Whenever a read completes, it immediately turns it around into a write to
    the destination file. Whenever a write completes, it immediately posts the
    next read from the source file.

    Thread 1
       |
       |
    kick off a few
    overlapped reads
       |
       |
  ->GetQueuedCompletionStatus(WritePort) <-----------
  |    |                                            |
  |    |-------------------------------             |
  |    |                              |             |
  | write has completed,      read has completed,   |
  | kick off another          kick off the write.   |
  | read                              |             |
  |    |                              |             |
  |____|                              |_____________|

比FileMap的方式还要快几个数量级

看来MS SDK中还是又很多宝的