Groups
Groups
Sign in
Groups
Groups
《linux环境编程》讨论组
Conversations
Labels
About
Send feedback
Help
mmap读写与直接读写的性能对比
75 views
mmap
read
write
Skip to first unread message
Gao Feng
unread,
Oct 6, 2016, 3:17:59 AM
10/6/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 《linux环境编程》讨论组
《Linux环境编程》11.4节中提到mmap的性能比直接读写的性能要差,下面是测试代码:
mmap写和直接写的对比测试代码:
https://github.com/gfreewind/LinuxDetails/tree/master/fs/1.mmap_write_performance
mmap读和直接读的对比测试代码:
https://github.com/gfreewind/LinuxDetails/tree/master/fs/2.mmap_read_performance
上面的代码测试结果显示,利用mmap读写还不如直接读写更快。
Reply all
Reply to author
Forward
0 new messages