Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 11:20
    claassistantio commented #508
  • 11:19
    dependabot-preview[bot] labeled #508
  • 11:19
    dependabot-preview[bot] opened #508
  • 11:19

    dependabot-preview[bot] on nuget

    Bump MailKit from 2.5.0 to 2.5.… (compare)

  • Feb 16 05:53
    joshmeads starred exceptionless/Exceptionless
  • Feb 15 21:37
  • Feb 14 22:06
    claassistantio commented #507
  • Feb 14 22:05
    dependabot-preview[bot] labeled #507
  • Feb 14 22:05
    dependabot-preview[bot] opened #507
  • Feb 14 22:05

    dependabot-preview[bot] on nuget

    Bump UAParser from 3.1.43 to 3.… (compare)

  • Feb 14 18:36
  • Feb 14 17:28
    claassistantio commented #506
  • Feb 14 17:28

    dependabot-preview[bot] on nuget

    (compare)

  • Feb 14 17:28
    dependabot-preview[bot] closed #502
  • Feb 14 17:28
    dependabot-preview[bot] commented #502
  • Feb 14 17:28
    dependabot-preview[bot] labeled #506
  • Feb 14 17:28
    dependabot-preview[bot] opened #506
  • Feb 14 17:28

    dependabot-preview[bot] on nuget

    Bump Foundatio.Repositories.Ela… (compare)

  • Feb 13 09:34
    StefanKoell commented #131
  • Feb 13 00:18
    claassistantio commented #505
Blake Niemyjski
@niemyjski
Any chance you could update all occurrences of ?.
Sander Rijken
@srijken
that sucks.. wish I knew about this
Blake Niemyjski
@niemyjski
yeah :(
Sander Rijken
@srijken
I didn’t see the build turn red either when I committed stuff
brb
Blake Niemyjski
@niemyjski
k
Sander Rijken
@srijken
@niemyjski there’s this R# key you can put in to have that warn about C#6. I’m gonna use that to find all the problems, but maybe you want to have that in there as well?
Blake Niemyjski
@niemyjski
yeah
where can I put that in
should be in the resharper settings for that project
Sander Rijken
@srijken
would be nice if that worked
tried, it came up with them, and then they were gone
gotit
properties window of the .Portable project
UGH
the first fix it suggests is “turn on C#6 support"
and there’s no other fix
Frank Ebersoll
@frankebersoll
Had a discussion at work today about performance of string comparisons. Colleagues wanted to do GetHashCode to compare two long strings, but it turned out to be a bad idea: GetHashCode would need to be
...called every time and it takes about 4 times longer than comparing the strings themselves
Sander Rijken
@srijken
makes sense
Frank Ebersoll
@frankebersoll
that's because string comparison and GetHashCode both need to look at every single character, but GetHashCode needs to multiply and xor things.
So, actually it is more costly and doesnt add any performance when used on few instances.
So, maybe we need more than one hashcode? Could we have a fail-fast-hash that only uses few properties?
Sander Rijken
@srijken
no
oh wait like that
hmm
but that makes things more complicated
let’s first measure things
Frank Ebersoll
@frankebersoll
Yes, i dont want to prematurely optimize either.
Just saying, because GetHashCode itself is already trying to be an optimization
Eric J. Smith
@ejsmith
problem is that you need a hash that covers the entire object in order to find matches later
Sander Rijken
@srijken
you could in theory use a quick hash to determine that it’s different for sure
like if the event message is different.. there’s no need to do a full hashcode
Eric J. Smith
@ejsmith
So like have 2 levels of hashes?
Frank Ebersoll
@frankebersoll
Yes, but those could be calculated on demand if the fail-fast-hash matched
Which would only happen rarely
Eric J. Smith
@ejsmith
Yeah
Let's test
Frank Ebersoll
@frankebersoll
With on demand i mean lazily
Sander Rijken
@srijken
well you need it right away, so I don’t get the lazily
it does save calculating them a lot though
I wonder if System.String save the hashcode internally after requesting
Frank Ebersoll
@frankebersoll
With lazy i mean the real hash
Sander Rijken
@srijken
it can safely do so as it’s immutable
Frank Ebersoll
@frankebersoll
It didnt when i looked at the code today
Sander Rijken
@srijken
that’s.. strange
Eric J. Smith
@ejsmith
Could do a GetQuickHashcode that just includes the base event level properties plus includes all the data key names
Frank Ebersoll
@frankebersoll
But i can
Sander Rijken
@srijken
if they do that, you have a very good change that it’s lightning fast, because most string that are generated by throw new Exception(“Somemessage”) are interned anyway