Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #39130
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2019-08-27 13:04 -0700 |
| References | (3 earlier) <qk3bq2$fh9$1@dont-email.me> <cbde76cd-4227-4f2c-b33f-54d8c3edebeb@googlegroups.com> <qk3jf9$s8n$1@dont-email.me> <07eb0e1e-eaa8-4a84-bf1f-f27c10277395@googlegroups.com> <qk3vi4$6f9$1@dont-email.me> |
| Message-ID | <9617e20e-51dd-4097-9dc8-eef3bb6712c1@googlegroups.com> (permalink) |
| Subject | Re: Best way to make a hashcode? |
| From | Eric Douglas <e.d.programmer@gmail.com> |
On Tuesday, August 27, 2019 at 3:16:32 PM UTC-4, Eric Sosman wrote: > It looks like direct hash computation should beat the pants off > render-as-string-and-hash-the-string, almost certainly and almost > always. (Suggested experiment, if you're interested: Compute a few > thousand hashes each way to warm up, then compute a few thousand > more and note the elapsed time. Additional fillip: Use the methods > of Runtime to approximate the memory used before and after -- but > realize this will only give an approximation.) > > Interchangeability of hash values is probably not a concern. > It is not unheard-of for instances of different classes to equals() > each other, but it is fairly unusual. > I've been trying to use POI to generate .xlsx files but their stuff is not clean by default. They allow a lot of unnecessary duplicate tags plus I found it takes exponentially longer then more cells I have. So I've been writing my own Excel API as an intermediate to gather what I need to write and get it clean then call the POI methods once to write it out. I believe there are a lot of possible property strings to a cell style object, but that may include a lot that we'll never need. I can hard code which properties we're using as needed into my own style class to generate the more efficient hashcode to merge cell properties into unique objects. This should run a lot faster. Some fun challenges with this project. I found that the POI API lets you write 'invalid' information to the xlsx file, the LibreOffice Calc may do what you wanted it to even if it is coded wrong, and the Excel 365 will come up with a 'we fixed it for you' and just delete what it doesn't like. Then, while Excel 365 does have a function UI that pops up a window listing all valid functions, it also has a conditional formatting UI that lets you format cell values using functions with absolutely no help on the syntax. I think they want you to read a manual and/or take a course on Excel to get it right.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Best way to make a hashcode? Eric Douglas <e.d.programmer@gmail.com> - 2019-08-26 13:51 -0700
Re: Best way to make a hashcode? Eric Sosman <esosman@comcast-dot-net.invalid> - 2019-08-26 17:41 -0400
Re: Best way to make a hashcode? Eric Douglas <e.d.programmer@gmail.com> - 2019-08-27 06:24 -0700
Re: Best way to make a hashcode? Eric Sosman <esosman@comcast-dot-net.invalid> - 2019-08-27 09:39 -0400
Re: Best way to make a hashcode? Eric Douglas <e.d.programmer@gmail.com> - 2019-08-27 07:29 -0700
Re: Best way to make a hashcode? Eric Sosman <esosman@comcast-dot-net.invalid> - 2019-08-27 11:49 -0400
Re: Best way to make a hashcode? Eric Douglas <e.d.programmer@gmail.com> - 2019-08-27 11:05 -0700
Re: Best way to make a hashcode? Eric Sosman <esosman@comcast-dot-net.invalid> - 2019-08-27 15:16 -0400
Re: Best way to make a hashcode? Eric Douglas <e.d.programmer@gmail.com> - 2019-08-27 13:04 -0700
Re: Best way to make a hashcode? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2019-08-27 23:51 +0200
Re: Best way to make a hashcode? Silvio <silvio@internet.com> - 2019-08-28 01:27 +0200
Re: Best way to make a hashcode? Marcel Mueller <news.5.maazl@spamgourmet.org> - 2019-09-06 19:42 +0200
Re: Best way to make a hashcode? Arne Vajhøj <arne@vajhoej.dk> - 2019-08-26 19:03 -0400
Re: Best way to make a hashcode? Eric Douglas <e.d.programmer@gmail.com> - 2019-08-27 04:59 -0700
Re: Best way to make a hashcode? Arne Vajhøj <arne@vajhoej.dk> - 2019-08-27 21:08 -0400
Re: Best way to make a hashcode? ross.finlayson@gmail.com - 2019-09-05 20:27 -0700
Re: Best way to make a hashcode? trisha guillot <guillottrisha347@gmail.com> - 2020-01-18 07:25 -0800
csiph-web