-
Notifications
You must be signed in to change notification settings - Fork 951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
解决win32 X64下的gettimeofday非常缓慢的问题 #51
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
非常感谢。 文档名称可以改为 最后,能否将5个commits合并一下为一个commits?(可能需要重新开一个PR)。再次感谢。 |
zieckey
reviewed
Jun 26, 2017
docs/quick_start_win32_vs2015.md
Outdated
- git.exe available in your path. You can download and install it from [https://git-for-windows.github.io/] | ||
- vcpkg. You can download and install it from [https://github.com/Microsoft/vcpkg]. Commits c5daa93506b616d253e257488ecc385271238e2a tests OK. Following [https://github.com/Microsoft/vcpkg#quick-start](https://github.com/Microsoft/vcpkg#quick-start) to install [vcpkg]. This document assumes that [vcpkg] is installed at `d:\git\vcpkg`. | ||
|
||
#### Install dependent libraries by using vcpkg | ||
|
||
Use [vcpkg] to install libevent,glog,gtest,gflags. | ||
|
||
## for win_x32: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的标题应该为 #####
好的 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1、文档里增加了win32 X64的配置编译方式(不过这个文件名还是win32, 有点怪怪的)。
2、文档中说使用的cmake 为3.8以上版本是不对的,实际使用发现cmake3.9是编译不了的。
3、win32 x64的getimeofday 的benchmark显示,gettimeofday慢得不是一个等级的。bechmark如下:
gettimeofday_benchmark loop=10000000 cost=5.07226s op=507.226ns/op QPS=1925.3k system_clock_benchmark loop=10000000 cost=0.777856s op=77.7856ns/op QPS=12554.5k steady_clock_benchmark loop=10000000 cost=1.01353s op=101.353ns/op QPS=9635.3k high_resolution_clock_benchmark loop=10000000 cost=1.0262s op=102.62ns/op QPS=9516.34k
参考nginx的gettimeofday(https://github.com/nginx/nginx/blob/f8a9d528df92c7634088e575e5c3d63a1d4ab8ea/src/os/win32/ngx_time.c ):
gettimeofday_benchmark loop=10000000 cost=0.586243s op=58.6243ns/op QPS=16658k
system_clock_benchmark loop=10000000 cost=0.790204s op=79.0204ns/op QPS=12358.4k
steady_clock_benchmark loop=10000000 cost=1.00596s op=100.596ns/op QPS=9707.73k
high_resolution_clock_benchmark loop=10000000 cost=1.00085s op=100.085ns/op QPS=9757.3k