TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Recordtype for Python: mutable namedtuple with default values

3 pointsby singingwolfboyover 13 years ago

1 comment

maciejover 13 years ago
What about performance? One of the reasons to use namedtuple is performance, esp. memory-wise (afaiu nametuple stores field names in class definition, which can save a lot of space compared to lists of dicts). I would expect recordtype to be better than dict but not as good as namedtuple. It would be nice if author posted some benchmarks…