Files
server/api/stream
昨夜雨疏风骤 4bc42d2c1d Optimize uniq function for better performance (#852)
Improve the performance of the unique function by:
1. Pre-allocating map capacity with len(s) to avoid frequent map resizing
2. Pre-allocating result slice capacity with len(s) to reduce append overhead
3. Reducing the number of traversals performs well under the condition of a large number of elements

These changes maintain the original behavior (preserving element order) 
while reducing memory allocation operations, especially effective for 
large slices (100k+ elements) with benchmark showing ~25% speedup.

No breaking changes, the function signature and output order remain unchanged.
2025-10-03 01:17:47 +00:00
..
2020-11-01 10:47:02 +01:00
2018-11-22 20:59:29 +01:00
2019-01-01 23:34:42 +01:00
2023-08-06 12:30:22 +02:00