Question: I have this action:

```
    [ActionName("Find")]
    [HttpGet]
    public override IHttpActionResult Find(string number)
    {
        //Get customer by number...
    }

```

This is the route:

```
        config.Routes.MapHttpRoute(
            name: "ApiByAction",
            routeTemplate: "api/{controller}/{action}",
            defaults: new { action = "Get" }
        );

```

This is the trace:

```
System.Web.Http.Request;;;http://localhost:12345/api/Customers/Find?number=100  
System.Web.Http.Controllers;DefaultHttpControllerSelector;SelectController;Route='controller:Customer,action:Find'
System.Web.Http.Controllers;DefaultHttpControllerSelector;SelectController;Customer
System.Web.Http.Controllers;HttpControllerDescriptor;CreateController;
System.Web.Http.Controllers;HttpControllerDescriptor;CreateController;CustomerController
System.Web.Http.Controllers;CustomerController;ExecuteAsync;
System.Web.Http.Action;ApiControllerActionSelector;SelectAction;
System.Web.Http.Action;ApiControllerActionSelector;SelectAction;
System.Web.Http.Controllers;CustomerController;ExecuteAsync;
System.Net.Http.Formatting;DefaultContentNegotiator;Negotiate;Type='HttpError',

```

However, the action is not found. Is the route incorrect?

Answer: 
`std::map` uses lexicographical ordering for the key type. This means that performance of search operations on the map is determined by the shared prefix of keys in the map and the key you are looking for. If you have many keys sharing a very long prefix, and you search for a key with that prefix, performance will dwindle.

For example, this is expensive:

```
aaaaaa <millions of a's> aaaa
aaaaaa <millions of a's> aaab
aaaaaa <millions of a's> aaac

```

This is cheap:

```
aaaaaa <millions of a's> aaaa
baaaaa <millions of a's> aaaa
caaaaa <millions of a's> aaaa

```
Yes, comparing two strings(with a long shared prefix) are generally O(n) complexity. 

if strings do not share a long prefix, it may take less time.

Generally, longer strings take longer time to compare.

Maybe you should consider unordered\_map (hash\_table) if key is a string.