Hacker News new | ask | show | jobs
by taeric 3195 days ago
Like the sibling said, you could bake the stats into member fields to cache the values. I'm guessing it wouldn't caused any real slow down, but I can understand the concern. Would also help for repeated calls to the same stat.

Though, I would also think a general .stats method would make the most sense. It is quite often nowdays to want a lot of stats.

And again, I am not arguing that the new lib shouldn't exist. I just question that example.