On Saturday, March 9, 2024 at 10:16:12 AM UTC-5 Robert Engels wrote:

When I went to the github site the OP linked it seemed to me the original 
question was not genuine and ...


Since the OP of this thread did not link anything, I assume you by "OP" you 
are referring to my comments on the thread?  

And from the fact that the original questioner is a different person than 
myself, how is it that you can conclude that her question was *"not 
genuine?"*  Do you have some kind of supernatural powers to discern her 
question? Or are you somehow implying sock-puppetry on my part here?!? 

Unbelievable.  
 

was rather asked to generate traffic to the site. 


*Are you f-ing serious?!?*  *WHAT* site are you saying the* "OP" (me?)* was 
trying to drive traffic to?!?

My original post on the thread included links to many sites, NONE of which 
I own, have control of, or gain any benefit from.  WHY would I be trying to 
drive traffic to those sites?

Or are you referring to my gist in follow up?  So I initially made the 
effort to research JSON unmarshalling and then write an in-depth answer — 
which started by saying *"Robert is probably right, but if it is JSON then 
consider this" —* *none* of which you had any critique for on its merits. 
Instead you passive-aggressively undermined my reply with your immediate *"just 
to be clear for others"* reply to my email that happened to ignore that I 
said your initial reply was probably the concern. And why? To assert 
dominance on this list?

Do you think I want to generate traffic to my gist?!?  That I would go 
through all the effort to write that detailed reply, expect someone would 
be a jerk, *then* plan to post a link to my gist to generate traffic? For 
what benefit would I get for sending traffic to a gist?!?  I use gists to 
*clearly* indicate to others that I get would *zero* benefit from traffic 
to the link. 

Make your accusations explicit if you are going to accuse.
 

Reading the content was more evidence the question was not genuine 


Again, the person asking the question was different than me *(or are you 
accusing otherwise?)*  So how the heck would* my* reply indicate that the 
original questioner's question was not genuine? * (Maybe it is not, I have 
no idea, but I assumed on face value that it was genuine. Would be a pretty 
sad world if we all assumed nefarious motives when there is zero evidence 
to indicate otherwise.)* What benefit would they get from asking it if it 
were not genuine? What specifically about their question indicates to you 
it was not genuine?

And what benefit would I get from answering her, other than to feel good 
about helping someone? *(Which, unfortunately, your replies have completely 
overwhelmed that tiny benefit.)*
 

states “I am doing unscientific testing for orders of magnitude”

 
Wat?!?  

I wanted to do a sanity check to make sure that PHP *json_decode()* was 
in-fact faster than Go *json.UnMarshal()* before commenting further, but as 
I have other things to do in my life so I did not want to devote days to an 
exhaustive, scientific benchmark, so I did some basic testing to get an 
understanding of if in fact the reason the OP was seeing a performance 
difference could be Go vs. PHP.  

And since I did not want you or someone else to say *"why didn't you show 
your work?"* I went ahead and put in the extra effort to publish my code 
and results. I wrote *“I am doing unscientific testing for orders of 
magnitude” in a *pro-active attempt to keep some jerk from having a *"Duty 
Calls <https://xkcd.com/386/>"* moment and take me to task for by claiming *"my 
benchmark was not scientific."  *But clearly my proactive attempt to ward 
of specious criticism did not stop you from being that jerk. No good deed 
goes unpunished, it seems.

makes a big deal of a 14 second difference on 100 iterations


So presenting results is* "making a big deal?!?"  *Good to know, I guess.

And what exact results would rise to meet your bar for a* "big deal?"*
 

and was merely a article on a flawed micro benchmark. 


If the benchmark was so flawed, why don't you fix it then. I published all 
the work I did.

Rather than taking easy pot-shots like a jerk, why not do some work and 
present alternate numbers?  

Or better, just not criticize in a passive-aggressive manner anything you 
think is not up to your standards?
 

Lots of bold letters on the differences, etc. 


So now we are determining that if someone uses formatting to make their 
posts easier to scan — an approach to writing technical documents I have 
used for decades, as evidence from my former life 
<https://wordpress.stackexchange.com/users/89/mikeschinkel> — that that 
somehow indicates they have *nefarious* intent?!?  Wow, you must really be 
fun at parties.
 

So yea, I was annoyed that I wasted my time posting trying to help on this. 


You were annoyed that you spent 3 minutes to shoot off an initial response 
that required no time to research or prepare?

**I** was *super* annoyed that I spent several hours writing up an answer 
that explained how to deal with slow JSON unmarshalling in Go while 
indicating that the OP should look first at the concerns already mentioned 
only to see an immediately reply to my reply undermining my answer in a 
passive-aggressive manner from the very same person who I wrote *"was 
probably right"* about the performance issue.  I thought *"What a jerk, but 
I will ask to clarify because maybe I could just be misunderstanding."*  
Well, clearly I was not misunderstanding.

Did the op even try the “object” option in PHP to make the comparison 
similar? Pretty certain if the OP made only minimal changes to the test the 
difference would swing the other way. 


And there you go with the assumptions again.  You do not understand how PHP 
works, do you?  Objects and arrays are not that much different inside PHP.

Did you even try to make those minimal changes and test for yourself?  I 
included everything I used to test in that gist.  I used ChatGPT to 
generate the benchmark which I used pretty much exactly as it provided 
<https://chat.openai.com/share/121ce49b-87cb-4501-97bb-45556a1eb52c>. And 
yes it is flawed for specific performance, I am sure, but does show that 
PHP's default JSON decoding is faster than Go's default JSON unmarshalling.

But to address your criticism I updated the gist 
<https://gist.github.com/mikeschinkel/14106e1aaa2b66f05ccce73b1af336e1#file-main3-go>
 to 
include to PHP generating objects. It required more memory and was 7.5% 
slower, but still 20% faster than Go.  

That said, comparing apples-to-apples is not super relevant here because I 
assume the OP just wants unmarshaling JSON in Go to be faster and does not 
care about optimizing PHP. Again, the sole reason I did the* "benchmark"* 
was as a sanity check to verify if PHP was indeed faster than Go or not.
 

Pretty certain if the OP made only minimal changes to the test the 
difference would swing the other way. 


Since you are *"pretty certain,"* why don't you quit with the assumptions 
and actually do your own benchmark showing your claims? But I do realize it 
is much easier to just take pot-shots, though.

I do get that you think her problem is probably not the JSON parsing — and 
I acknowledged up front that was probably the correct concern — but you do 
not know for sure that the JSON parsing was not her issue — and as there 
are at least nine (9) 
<https://groups.google.com/g/golang-nuts/c/i84aePH22us/m/E1TwxVemAQAJ> 3rd 
party packages designed to perform better than *json.UnMarshal()* it was 
not unreasonable to think that maybe, just maybe the performance of JSON 
parsing is an issue for her., and for me to post an answer that addressed 
that, *just in case. *

In summary, I have found your hostility on this thread to be completely 
inappropriate. I simply answered a question about working with JSON in Go — 
*after 
I acknowledged your initial reply was likely the cause of the OP's concern* — 
in an attempt to help the OP and any others who might need faster JSON 
parsing.  Then — for some reason only you can know — you decided to be 
passive-aggressive in reply to my answer, and then explicitly attack me and 
my participation on this list when I posted a follow up showing the sanity 
checking I had done. I guess in your world, the only replies to this list 
that are reasonable are the ones you think are reasonable, and all others 
deserve a condescending response 

-Mike

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/e5e6ea08-b746-42c7-bff6-bf63694f740an%40googlegroups.com.

Reply via email to