optimizing my version of uniq

Table of Contents Problem Uniq V2 Solution Test File Attempts First Attempt - Base Implementation Second Attempt - Operate on the byte slice directly Third Attempt - Allocate output slice at one time Fourth Attempt - Use unsafe Fifth Attempt - Use my own hash Thoughts References I used for this post Problem While browsing coding challenges, I came across a task on codingchallenges.fyi that caught my attention. The challenge was to implement a uniq tool, which filters out adjacent duplicate lines in a file, similar to the Unix command-line utility.

Read more...
1 of 1