Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
hostip: make create_hostcache_id avoid alloc + free #3544
The data is short-lived and will be copied anyway. By using a stack buffer and not doing a sprintf + lower case in two separate passes, this should speed this up quite a lot - although presumably not really noticeable...
In my test 8GB HTTP transfer from localhost, this patch reduces the total number of allocations needed from 87 to 83.