dendibakh / perf-book

The book "Performance Analysis and Tuning on Modern CPU"
https://book.easyperf.net/perf_book
Creative Commons Zero v1.0 Universal
2k stars 144 forks source link

Incorrect the code line number on page 96 #8

Closed ujos closed 2 years ago

ujos commented 2 years ago

Looks like on page 96 there is a typo. The text there references to dependency introduced inside the loop. The loop starts at line 5, really. But the dependency is on the line 6.

image

dendibakh commented 2 years ago

@ujos Thanks for all the issues you've opened. I will keep them for now and probably won't address them immediately. Formatting is hard. Or maybe I'm just bad at LaTex. :) Anyway, I will focus on formatting after major changes to the book are in place. Again, thanks for reporting them!

ujos commented 2 years ago

Actually this ticket is not about formatting. I believe 5 should be changed with 6 (highlighted)

dendibakh commented 2 years ago

Ah, OK. But actually, the loop is on line 5. I was trying to be consistent with the compiler optimization reports. They attribute all transformations inside a loop to the line with its header.

ujos commented 2 years ago

I mean that in the book you mentioned some dependency in the loop-body and instead of pointing on the line where dependency is introduced, it refers the ‘for’ statement which confuses the reader. Well… at least me as a reader was confused :)

Best regards Dima


From: Denis Bakhvalov @.> Sent: Friday, December 17, 2021 10:22:36 PM To: dendibakh/perf-book @.> Cc: Dmytro Ovdiienko @.>; Mention @.> Subject: Re: [dendibakh/perf-book] Incorrect the code line number on page 96 (Issue #8)

Ah, OK. But actually, the loop is on line 5. I was trying to be consistent with the compiler optimization reports. They attribute all transformations inside a loop to the line with its header.

— Reply to this email directly, view it on GitHubhttps://github.com/dendibakh/perf-book/issues/8#issuecomment-997039009, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAARKHFRCMFJGCVYNQPK7LDUROSZZANCNFSM5KIYEMYA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.***>

dendibakh commented 2 years ago

Ok, I think you're right. Fixed with https://github.com/dendibakh/perf-book/commit/c60aa4d6ab1f0482829d76a481b632c1e6429600. Thanks.