Comments (5)
Regarding 1: yes, you are right. But it wouldn't be a difference in terms of CPU or memory. As HashSet uses even more memory than HashMap and calculating the hashCode would still be done under the hood from hashset ... but when I think about it then this could be improved using an IdentityHashMap. I'll see if I can get all tests passing
Regarding 2: Thanks! Really not necessary.
from snacktory.
The linked hashmap cannot be replaced by an identity hashmap as the order of insertion is important.
from snacktory.
Is this now better understandable?
from snacktory.
Yes, definitely clearer but I'm still not convinced a Map
is suitable here; you are filling the values with null
and returning a Set
... This may be a matter of preference though (especially if HashMap
has better performance than HashSet
).
from snacktory.
Yeah, ok. I'll see if it would have significant perf or memory differences. BTW: hashset is implemented via hashmap ...
from snacktory.
Related Issues (20)
- Text content is removed when there is an image in news webpage. HOT 1
- Snacktory on Android? java.beans.Introspector HOT 6
- Fetch content from Twitter URLs? HOT 4
- Unsupported Popular Internet Landmarks HOT 1
- Misspelling in README file
- Many websites only extract partial content HOT 7
- Allow users to set a proxy HOT 5
- String text ignores paragraphs, isn't there a way to get the text in html
- NoClassDefFoundError: Could not initialize class de.jetwick.snacktory.HtmlFetcher HOT 4
- wrong imageUrl in youtube url's HOT 2
- Not working
- dependency via sbt
- Make it possible to Increase maxBytes in HtmlFetcher
- Stack overflow ...
- Crux, an Android-optimized fork of Snacktory, with many issues fixed HOT 7
- Converter.detectCharset throws for inputs longer than 2048
- Please don't cause referrer spam HOT 3
- Not able to extract content HOT 1
- Bad parsing of article from `cnbc`
- Bad parsing of article from `nytimes`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snacktory.