PERF: Cythonize `from_nested_dict`
I did try to cythonize this function, but the problem is that it also accepting a ```collections.OrderedDict```, which cannot be ```cdef``` as ```dict```, but have to ```cdef``` as ```object```.

---

I don't see much of a performance boost, I have ran the full benchmark suite and ```asv``` says that the ```BENCHMARKS NOT SIGNIFICANTLY CHANGED.```

Maybe just better to remove the ```TODO``` note, thoughts?
I don’t think the OrderedDict is needed here anymore. It’s likely a leftover from when Pandas supported python < 3.6 when normal dicts weren’t ordered.

Can you try to convert the use of OrderedDict to a normal dict? That will probably give some speedup on your Cython impl. ASV benchmarks:

```
       before           after         ratio
     [c6c53671]       [94977b2b]
     <master>         <TODO-cythonize>
-        1.52±0ms      1.22±0.08ms     0.80  series_methods.NanOps.time_func('prod', 1000000, 'int8')
-     1.11±0.01ms         833±70μs     0.75  series_methods.NanOps.time_func('sum', 1000000, 'int8')

SOME BENCHMARKS HAVE CHANGED SIGNIFICANTLY.
PERFORMANCE INCREASED.
```

Not sure if it's related to the change. > I don’t think the OrderedDict is needed here anymore. It’s likely a leftover from when Pandas supported python < 3.6 when normal dicts weren’t ordered.
> 
> Can you try to convert the use of OrderedDict to a normal dict? That will probably give some speedup on your Cython impl.

Agree I started removing our usage of OrderedDict in https://github.com/pandas-dev/pandas/issues/30469 think I have a local branch with a bunch more fixed. Will submit soon.  > Thanks. I think a little strange to implement this in lib since it relies on frame methods that are implemented in frame.py - not sure if that's a blocker yet just thinking out loud

I don't really know where to put it, what you had in mind?

 > Thanks. I think a little strange to implement this in lib since it relies on frame methods that are implemented in frame.py - not sure if that's a blocker yet just thinking out loud

this is a strange comment

lib holds cython code  > this is a strange comment
> 
> lib holds cython code

Yea to clarify my point is that the code moved is just really looping over `df.items()`. I think this just fragments the code without really offering an improvement (at least from latest ASV results posted) @MomIsBestFriend if we cant find a performance bump here, better to just remove the TODO comment and move on. Closing.  @MomIsBestFriend if you want to re-open to remove the comment let us know.