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: 
Yes, the map has to perform a less-than comparison of the keys. This is a lexicographical comparison and is linear WRT the string size.

This does not affect the time complexity of the `find` method, which refers to the number of comparisons required. It affects the constant factor.

Whether that matters or not in your application should be determined empirically.
`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

```