ARTS 20190929

以下是本週arts:
1.algorithm:
本週足了下面這道題,使用棧來解碼一個字符串。我提交了C++和python兩個版本的代碼,python的代碼非常簡潔,又一次感嘆python處理字符串的強大。下面給出討論區裏面的c++和python版本對比。
https://leetcode.com/problems/decode-string/submissions/
https://leetcode.com/problems/decode-string/discuss/87543/0ms-simple-C%2B%2B-solution
https://leetcode.com/problems/decode-string/discuss/87563/Share-my-Python-Stack-Simple-Solution-(Easy-to-understand)

2.review:
讀了關於intel架構cpu緩存的一篇文章:
https://software.intel.com/en-us/articles/optimizing-application-performance-on-intel-coret-microarchitecture-using-hardware-implemented-prefetchers

3.techinique:
如何用c++計算cache的容量
別小看這個問題,C++的一個重要特點就是能夠發揮硬件的極致性能,而發揮硬件的極致性能就要充分利用緩存。可以參考下面這篇文章計算緩存容量。
https://stackoverflow.com/questions/19136846/write-a-program-to-get-cpu-cache-sizes-and-levels

4.sharing:
本週總結整理了一些C++知識點,面試必問
https://blog.csdn.net/tassardge/article/details/101724789

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章