If I was implementing this in production I certainly would apply some sort of window function. However this blog post was mostly just to show some cool code, and ease of reading was my first constraint. Notice also how I kept intermediate arrays around in my functions. This uses more memory but is easier to read.
In the end this approach doesn't seem to scale to the amount of data Shazaam must be processing so it's all moot anyway.
If I was implementing this in production I certainly would apply some sort of window function. However this blog post was mostly just to show some cool code, and ease of reading was my first constraint. Notice also how I kept intermediate arrays around in my functions. This uses more memory but is easier to read.
In the end this approach doesn't seem to scale to the amount of data Shazaam must be processing so it's all moot anyway.
reply