contributed by < chensheep
>
請參考 ac11a22 Reduce shared buffer size using 2-bit encoding per grid
commit 中使用兩個 bits 去描述一個 grid 的值,分別為
00 表示 O
01 表示 X
11 表示其他
如此一來當 BOARD SIZE 為 4 時原本需要使用 66 bytes 來傳輸一個畫面,修改後僅需 5 bytes,減少 92.4% 的記憶體傳送大小。
e6ab69c Refine output layout to resemble original layout
後續也在這個 commit 中調整繪製的格式與修改前相同,如下。
提供數學分析