-
Notifications
You must be signed in to change notification settings - Fork 392
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
Performance improvements #1
base: master
Are you sure you want to change the base?
Performance improvements #1
Conversation
Interesting findings, great thanks. |
AFAIK pthread_yield does not exist on MacOSX.
|
Yes, the linux man page says about
Thanks for noticing it. |
I remember about performance improvements made by @victor-istomin and I also made some additional profiling and research. The results are very sad:
I tried to use custom string conversion functions and got a near 5x performance boost! |
393d175
to
f4c22b0
Compare
7831b21
to
e2650b8
Compare
Mutex lock is not necessary when performing line formatting and conversion to UTF-8, so I have moved string manipulation out of the locked scope. This gave more concurrency level and about 3 times more performance on Windows with my test sample.
Hello,
I've tried this logger and found it pretty light and useful. However, I've found multi-threading concurrency bottleneck, so I'd like to improve this a bit.
Test code sample and benchmarking result will be provided below.
Multithreading test code
Benchmarking results for Linux
Test system is Core i5-4300M with SSD. OS: Windows 10 host, VM: Unubtu Linux 14.04.2.
Original branch
top/iotop results: Disk write speed 4-5 MB/s, CPU 25-30% total (one core at 100%).
Performance improvement branch
top/iotop results: Disk write speed 17-22 MB/s, CPU 100% total
Benchmarking results for Windows are very similar.
Thanks for review and feel free to ask additional questions if needed.
Victor.