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.

Ruby is not giving stress to Core computer science

1 pointsby luckydevabout 14 years ago

1 comment

SamReidHughesabout 14 years ago
In languages like Ruby, the benefit of having a data structure written in C often outweighs the benefit of having a more appropriate data structure in the same complexity class, when it's written in Ruby. So there's no reason to consider using a trie, or some other interesting data structure, if the default hash table is written in C. And if you really cared about performance you could write that part in C.<p>And if you have a specific need it's often just as good to create a side-table rather than some intricate thing built out of nodes and pointers that you would have in C.<p>When you need something like a sorted dictionary, the sortedness is often just a feature of the underlying database, if it's a web app. It's fairly rare that you need things like randomly accessed sorted maps for stuff that isn't already in a database.