Re: [whatwg/fetch] Support 1D list as Header `init` (#1274)

This data structure comes from Node actually: https://nodejs.org/api/http.html#http_message_rawheaders

It is how headers are currently managed in http.

The efficiency I've measured is in overall speed. In my implementation, insert and look up are ever so slightly slower because of the binary search/input algorithm. And by sorting on insert, iteration calls are significantly faster. 

Additionally, it is theorized that a flat array based structure is more memory efficient as well; though, I have not been able to verify this (if anyone has ideas, please share).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1274#issuecomment-892619857

Received on Wednesday, 4 August 2021 12:34:22 UTC