try find the fastest way to convert a group string into index?

learnfirst1 learnfirst1 at gmail.com
Sun Sep 16 10:04:09 UTC 2018


The use case is translate http header key into enum.

this is the current code : https://run.dlang.io/is/lpw29w

In this fake code I only list a few headers,  it should be more.  
but less then 128 and only include the a few codes.

how to make this more fast like with one loop and get the results.

I am think of use PCRE compile for this, but not sure how.

It should also save the non default headers in to a new array, so 
when search non default headers will reduce the total size.

I am plan to write a more fast http server with D betterC compare 
to vibed.







More information about the Digitalmars-d-learn mailing list