JSON is like the python of language, slow but convenient to use
@ThePrimeagen2 жыл бұрын
I think this is the perfect description
@worstfellow2 жыл бұрын
We want to know more about JSON alternatives
@tattipodapatti2 жыл бұрын
@@worstfellow Yes, but definitely not XML
@nature-.2 жыл бұрын
@@tattipodapatti yes even non programmers can understand JSON easily, government of india is using it in websites like income tax for the users to download as json
@guruji-.2 жыл бұрын
@@codyking9491 yes already we have too many javascript frameworks don’t want too many data formats 😅
@MrMw19792 жыл бұрын
Great video. Thanks for introducing me to Deku. I think there is a lot of information left out here. I'm gonna outline my opinions below even if they don't matter: 1. JSON is not for computers it's for humans. Trouble shooting binary requests isn't easy. 2. GZIP compression can greatly reduce the bytes over the wire. JSON with lots of repeating keys can greatly benefit from gzip. 3. A lot of the time the database is your actual bottleneck and serialization doesn't matter for performance. In fact, 1,600 requests per second is more than most companies/services will ever see. 4. Having the document define the schema allows for flexible data. You can't just send arbitrary data with a binary protocol. This has pros/cons. For a public facing web service that only receives a couple thousand requests per second I would pick JSON over any other structured binary protocol almost every time. Yes there is a cost to simplicity but there is also a cost to complexity. Make it easy for internal (engineers) and external (users) to troubleshoot. Just use JSON unless you have identified that serialization is the bottleneck in your endpoint.... For most endpoints/services, I would wager serialization is not the bottleneck.
@vaisakh_km2 жыл бұрын
things like scientific applications involving high density of data collected in small amount of time(rocket controls, explotions tests..), and things that are inherintly binary(vnc), JSON is not a good choice anything involving man, it's good to use JSON
@evasiveutopian2 жыл бұрын
to your 3rd point. It was even greater 1,600 requests per milliseconds ~ which would be 1,600,000 requests per second
@alkolaqi832 жыл бұрын
on point
@odnoletkov2 жыл бұрын
Comments like this keep my hope in the humanity
@thekwoka47072 жыл бұрын
Why gzip when we can Brotli?
@ThePrimeagen2 жыл бұрын
Hey, did you like the video? I really enjoy making this kind of content. That's fun. Do you think I should do something with promises? (MAKE A COMMENT, Do not respond, KZbin has the worst notifications)
@codewithguillaume2 жыл бұрын
I think you should learn french
@CemKavuklu2 жыл бұрын
These videos are getting better and better both in quality and entertainment factor :)
@ThePrimeagen2 жыл бұрын
That's what I like to hear
@vaisakh_km2 жыл бұрын
@@ThePrimeagen to bad you cannot 'hear' that... unless you made a speech to text app in RuSt... :) edit: text to speech
@oliverchalkley11872 жыл бұрын
@@vaisakh_km if he had then it would have been blazingly fast
@scottiedoesno2 жыл бұрын
BLAZINGLY SLOW. Thanks for another great technical video! I hadn't actually thought about it until now, but this explains perfectly why we use protobuf so much in embedded work
@ThePrimeagen2 жыл бұрын
Absolutely. By the way, I haven't responded to your discord message. I'm on a flight to meet my boss right now, and then I'll be able to update you
@scottiedoesno2 жыл бұрын
@@ThePrimeagen Thanks a ton. Have a safe flight and hope the meeting goes well
@destinyinskyx2 жыл бұрын
@@ThePrimeagen you have a boss? thought ur the boss
@dickheadrecs2 жыл бұрын
blazingly slow is the new blazingly fast
@DaddyFrosty Жыл бұрын
@@dickheadrecs I just heard that sentence with Fireships voice thanks for making my day
@DelaoOliveira2 жыл бұрын
It would be nice to see a video comparing sending JSON/XML/Apache Avro/Protobuf over the wire with Rust/Go/JS. Great video, as always;
@ebrelus76872 жыл бұрын
Absolutely must happen
@es689512 жыл бұрын
For sure. I am also curious why “deku” instead of using exactly Avro or Protobuf. This approach doesn’t seem to take into account forward/backward compatibility, unless I missed something?
@dealloc2 жыл бұрын
Binary formats are difficult to maintain and scale at certain points, as ThePrimeagen notes, it's also not easy to version; you'll have to change your parser to read data correctly, or know where to take up unused space to give room for future improvements without breaking the protocol. But it's really good for real-time systems that need to deliver a lot of data in a small amount of time. For example game servers where feedback should be fast and responsive both on the client and across other clients with different network conditions at 60fps, while also dealing with other systems like rendering.
@ko-Daegu Жыл бұрын
Protobuf then?
@alexgochenour87402 жыл бұрын
I can't stop loving this content. JSON is something I use daily but never really think about. A deeper than usual deep dive, yet still accessible. Thank you my good man
@ThePrimeagen2 жыл бұрын
ty ty ty
@filipebraganca25582 жыл бұрын
It kinda landed right at the best moment, as I'm trying to improve the performance of our microservices where are transferring millions of JSON messages and can see the real cost of JSON serialize/deserialization growing super fast. I was studying GRPC and just learned about this protobuf here, thanks again for sharing this kind of content!!!
@asdqwe44272 жыл бұрын
GRPC is wonderful. And reading the proto files is so much better than working with swagger
@Ether_Void Жыл бұрын
There is actually a successor to GRPC & Protobuf called Cap’n Proto. Afaik it's made by the same person but they are no longer working for Google. It's faster because Cap'n Protos RPC can "travel back in time" (send a rpc using the output of a another call before the call has even finished) and it does direct in-memory modification rather than adding extra encoding & decoding steps. You of course keep the benefit of having a separate protocol definition that can be used across multiple languages.
@ko-Daegu Жыл бұрын
@@Ether_Void “before call is even finished” sounds cool but also scary this rings so many alarms in my head as a security analyst
@localboxcrox2 жыл бұрын
i love that akame wallpaper behind your transparent terminal with nvim open. nice touch.
@js-ny2ru2 жыл бұрын
Recently I was comparing Deno and Rust. What surprised me was how much simple JSON response weigh...
@ThePrimeagen2 жыл бұрын
People just don't realize how expensive simplicity is
@enclave2k12 жыл бұрын
@@ThePrimeagen I'm a simple man; consequently, an expensive one as well.
@notsojharedtroll232 жыл бұрын
@@enclave2k1 xd
@diegolikescode2 жыл бұрын
Prime, these videos make us all better programmers. Thank you so much, I have been so much healthier programming and having fun doing it just because of your content, and that makes me a much better programmer
@ThePrimeagen2 жыл бұрын
Love to hear that giga Chad
@OcarinaOfVali2 жыл бұрын
holy gigachad comment
@asdqwe44272 жыл бұрын
Very cool video 😎 Would be interesting to see jsons position challenged. I wonder how gRPC would compare, as I have never used it in the browser. But, before we hate on JSON, let’s remember that it freed us from XML
@TesterAnimal12 жыл бұрын
It didn’t really. All these horrible front end “frameworks” go through linguistic and development hoops to preserve XML. UIs are defined in some bastard munged XML+JS format that can’t be merged. UIs can be described in JSON. But a bunch of HTML authors from 1994 still want to do
@ABaumstumpf Жыл бұрын
Yeah, it "freed" us from a more structured approach that also supports comments and validation....
@lunafoxfire Жыл бұрын
@@ABaumstumpf you dont need to send comments over API requests, lol. XML is fine for a lot of cases if you like it, but it makes no sense to use it for network traffic.
@ABaumstumpf Жыл бұрын
@@lunafoxfire "you dont need to send comments over API requests" Who said anything about API request?? "but it makes no sense to use it for network traffic." Then that applies exactly the same to Json.
@lunafoxfire Жыл бұрын
@@ABaumstumpf ...the whole video was about network traffic... ...thats what the original comment was about...
@arkayv2 жыл бұрын
I think JSONs fall into the same pitfalls as document storage DBs. They are so easy to understand and implement, yet so goddamn hard to let go off even after you learn about better and BLAZINGLY FAST-er alternatives (like good ol' postgres or protobufs in this case). This requires a change in mentality more than anything. I suppose old habits die hard.
@ThePrimeagen2 жыл бұрын
Exactly. Simplicity is amazing. I cannot stress that enough. But it also costs a lot.
@Omikronik2 жыл бұрын
I interned at an insurance company where the way they received new insurance data was through a single string that was about 5000 characters long and parsed it by slicing that string at intervals and it almost always caused issues with encoding because it used ascii encoding and all the responses were in utf-8 so it had a billion safeguards that would always break when someone entered a non ascii character. I'd say it doesnt get more blazingly fast than this but its written in the most cursed and blazingly slow C# code ive ever seen in my limited experience. Best part is they moved to c# from java like 7 years ago but just kept this system instead of rewriting it to use xml or "jizzle"
@headlights-go-up2 жыл бұрын
Really enjoyed this. It just seems like, for better or for worse, the ease and convenience of JSON trumps everything else.
@zyriab5797 Жыл бұрын
I'd just like to interject for a moment. What you're referring to as Json, is in fact, JSML, or as I've recently taken to calling it, Tom is a genius.
@echobucket2 жыл бұрын
As someone who tried writing this kind of stuff back before JSON and even before XML, the reason we went with this stuff was for debugging purposes. At the time it was so nice to just watch the stuff on the wire, and be able to have it be human readable. However, I would argue this was mostly because there was not a de-facto binary protocol well understood by common tooling. I think it's entirely possible for us to have a nice binary encoding that our tooling (things like wireshark, Charles proxy, Chrome dev tools) could read and understand without it being fat and bloated like JSON.
@שחרכהן-ס7ר2 жыл бұрын
This
@billeterk2 жыл бұрын
Insert obligatory xkcd standards cartoon here ;-)
@phoenix-tt Жыл бұрын
I guess it would be really beneficial for the adoption of protobufs as well, if you could just upload a .proto to devtools and see all the underlying data
@drilkus13122 жыл бұрын
Crazy timing. My frontend team at work is frequently wondering why we're not doing JSON payload, so i can send this! Super informative, thanks!
@ThePrimeagen2 жыл бұрын
hah! well if your backend is dictating it, they are smert
@Sakrosankt-Bierstube2 жыл бұрын
The deserialization from json from the requests and the database to serialization to the response are actually in the top 5 of our bottlenecks in the company i work in. 40ms of a 100ms request are just for de-/serialization from/to json.
@ThePrimeagen2 жыл бұрын
That is incredible. And if you're using a garbage collected language, don't forget the effects of garbage collection.
@Sakrosankt-Bierstube2 жыл бұрын
@@ThePrimeagen Well, we use Java so... yeah.. xD
@rafaelgil68952 жыл бұрын
I'm, just using "edn" (extensible data notation) by default since it's not only "blazingly" but also "extensibly" fast :D Amazing video btw, like always!
@ThePrimeagen2 жыл бұрын
Tytyty
@camillenovak83592 жыл бұрын
These types of videos are super valuable and I really appreciate the way you go into the technicalities and explain these topics. Loving the format!
@mdfalexis2 жыл бұрын
This is an algorithmic message to let you know that this type of content is really really appreciated !
@waylag91442 жыл бұрын
I'm loving the new editing style. not too much but just the right amount of sass
@alexandrosvangelatos99792 жыл бұрын
Love your videos dude! What's with the dancing squirrel 💃🐿️? 🤣🤣🤣 Good one!
@ToukiMS2 жыл бұрын
As a french dev, hearing you say "jason" makes me giggle in the weirdeist way 😅 Your more technical videos are so great, kudos !
@ThePrimeagen2 жыл бұрын
Will do, and I will never let JSON be said any other way
@stryhx2 жыл бұрын
damn! that sub request was really well placed and timed! nice one!
@Dayun1232 жыл бұрын
Absolutely loving these performance deep dives! Keep ‘em comin!
@kortes89142 жыл бұрын
Your production quality has gone up and the humor is on point. Today I decided to subscribe! I can officially say that I like this channel now :) great content my dude!
@dandreani2 жыл бұрын
having just seen Mark Robber's last Olympiad for squirrels. I can appreciate the squirrel for science...
@ThePrimeagen2 жыл бұрын
Science squirrels are incredibly important
@KroshkaMu Жыл бұрын
I want an update of this video, this time featuring JDSL and Tom the genuous
@BlueeyesChineseguy2 жыл бұрын
For the algo
@ThePrimeagen2 жыл бұрын
For the thankfulness
@paulgupta2454 Жыл бұрын
been watching a lot of your videos, I feel like your newer 'hot take' videos on blogs are fine and all, but you're a good teacher and I'd like to see more of these more informative/objective vids from you because you're a pretty good teacher when you do this sort of content!
@yxtqwf2 жыл бұрын
I think another benefit of JSON (though it may not be as relevant in this example as in, say, a web application) over any binary format is that it is immediately readable to any user. I can't count the number of scripts or alternative clients I've been able to write just by inspecting the JSON data a website sends. A universal, plain-text format like JSON frees the potential of how software is used from just the developer and places some choice in the hands of the user as well. Another thing, I've found that I really like the TSV (tab-separated values) format for storing any tabular data. It's so simple, effortless to parse, and much more compact compared to JSON or even CSV (the schema is usually just the first line, or can even be omitted). I'm not sure how it would work as a data transfer format, and though I don't see it commonly used, I doubt there would be any significant problems.
@Winnetou172 жыл бұрын
Hey, I clicked that weird red button that says SUBSCRIBE on it and indeed, there were multiple AJAX calls that were using JSON for BOTH request parameters and response data. Crazy!
@ThePrimeagen2 жыл бұрын
Weird. This Json thing might just catch on after all
@christophergruendell8089 Жыл бұрын
The lab coat and theme when you went all sciency gave me serious Garand Thumb vibes. I love it. You guys even kind of look like each other.
@WilliamCulver Жыл бұрын
I don't know how I got here guy, but I'm absolutely glad to be here - some slick vim keystrokes, nice editing and explanations. Keep it coming good sir.
@tibixdev2 жыл бұрын
This was a really cool deep-dive, but also very entertaining and straight to the point. Looking forward to more stuff like this. :)
@ThePrimeagen2 жыл бұрын
I think I could have done a better job and got a bit slower on binary representation. But, it's such a hard balance to not be long-winded, but be entertaining. So thank you for the note!
@pemedeiros2 жыл бұрын
For more information on that topic I recommend chapter 4 of Designing Data-Intensive Applications. Really good video :D
@drborisyum99772 жыл бұрын
Love this form of content Prime! 👍 You make harder concepts (for me anyway) as digestible as possible! So invaluable.
@moodynoob2 жыл бұрын
Loving this series! This is great content covering topics that aren't too easy to find, most of YT is for junior devs.
@digicyc Жыл бұрын
I absolutely vote for more videos like this, but maybe some more involvement in the creation of the code. Loving it! SO much JSML o_O
@JanKammerath2 жыл бұрын
Anyone else currently looking at a JSON parser and your head constantly screaming "Jéson!"?
@sunnyheheheh94012 жыл бұрын
Your jokes in this type of developer/programming videos is funny and unique and I would love to see more of em keep up the good work.
@fabianschwarzfritz2 жыл бұрын
I like this format! Could be even a bit deeper / more technical and longer :). Anyway, super cool format!
@TownspersonB2 жыл бұрын
This was very interesting and something I hadn't really given second thought to when I'd use JSON
@ahmedeatsplanets Жыл бұрын
This is one of the best videos on programming I've ever seen. I feel enlightened and empowered
@MohitDodhia2 жыл бұрын
had to pause at the intro just to mention how smooth that subscriber plug was. ggwp edit: what a great video
@blarghblargh Жыл бұрын
There's a Handmade Seattle talk from 2021 called "context is everything" that shows you can get huge speedups if you can tighten your schema, and if you have full control over your tools that do the parsing (down to using native code). JSON imposes a tax in comparison to raw bytes, but you can still get big gains if you can tighten down your schema. Thinking JSON/not JSON in black and white will cost you orders of magnitude. You should consider if you actually need the flexibility of wide-open generic constrains on either the parsing or the generation side.
@GeekMasher2 жыл бұрын
Amazing video as always, please keep them up!
@thehibbi2 жыл бұрын
Very informative and comedic video, thanks :) Keep up the good work TheScienceagen
@WebLego2 жыл бұрын
A few extra bytes to be human readable is totally worth it. The fact that you inspect the JSON sent in the dev tool sis testament to that. I would say the overhead of the encoding/decoding is perceptabible for most use cases.
@gnikdroy2 жыл бұрын
The particular example you gave is just wrong. Dev tools could've just as easily transparently converted to/from an efficient binary format. Surely a human-readable format is useful. But nowhere as useful as people think it is. Images are not human-readable, neither are docx, pdfs, or mobi. Plus, if readability was a concern a subset of YAML (which is less complicated to parse) is much more readable than JSON. How is an unparsed, unindented JSON readable anyway? And if you have to do parse JSON to display in a "human readable" format anyway, why not use a binary format, or a subset YAML?
@FunOrange422 жыл бұрын
@@gnikdroy because the tooling already exists for JSON
@gnikdroy2 жыл бұрын
@@FunOrange42 Yes, and your answer is the correct one. JSON is not used because it is "human friendly". It is used because the tooling required for it was already there. Javascript always understood JSON. And that is all it took for it become popular
@astrahcat12122 жыл бұрын
I was gonna say, you're gonna get people arguing with you instantly in this thread. I agree with you Michael but what can you do. A day is coming when quantum computers will make it so that the difference is actually negligible.
@es689512 жыл бұрын
@@gnikdroy by “subset of YAML”, I assume you mean basically just the keys + values? Because ‘less complicated to parse’ is absolutely not true for full YAML vs JSON… if you look at the spec alone, this is quite clear (YAML spec is even longer than XML…, and ~10x longer than JSON). Because of this complexity, also different YAML parsers may sometimes give entirely different interpretations & parsings for the same YAML string. And I would argue that even the subset of the most basic functionality of YAML is still more complex to parse than JSON, since tracking indentation to denote “Start object”/‘End object” is already more complex than simple delimiter characters… and inevitably someone will use a tab when someone else used spaces. And someone may use 3 spaces to indent while another uses 4. And so on. It’s very easy to create broken YAML while also hard to verify because it’s very easy to create YAML which is semantically broken but syntactically correct. YAML can’t detect that you meant for a line to have different indentation, while JSON can detect very easily that you didn’t add a “}" Unindented JSON may be unreadable, but unindented YAML is semantically broken. Unindented + single-line JSON may be EXTREMELY unreadable, but unindented + single-line YAML is syntactically broken
@laupetre2 жыл бұрын
I really enjoy these comparison videos, especially with your humor.
@camenraidercc66252 жыл бұрын
Hi Man! So it's been a couple of weeks since you started to appear in my recomendations, for some reason KZbin is suggesting me all your VIM videos, now i don't give a damn about VIM and i didn't found the thumbnail any interesting so i decided to ignore it, but today it suggested me this one....so i watched it.....and now i've watched almost all of your videos :D This is very good and entertaining content, keep up the good work ( i'm still not gonna watch the VIM videos btw )
@shahabqamar13 Жыл бұрын
0:24 its used by Tom The Genius Jay-Diesel
@robinbauhn86852 жыл бұрын
Would be interesting to see comparison between deku and MsgPack since it sits somewhere in between binary and json
@daedalus50702 жыл бұрын
As a front-end dev - I feel personally attacked by Prime's videos but I do appreciate them all the same!
@quintondeanmusic2 жыл бұрын
Great video. Super interesting to see! The “XML is worse” part got me in kidneys. I have to work with shitty XML everyday as a messaging schema between our app and other companies integrations (LEGACYYY). Slow and terrible to work with. The worst of both worlds.
@adambickford87202 жыл бұрын
Its run by business, not engineers; jsôn allows for a more commodity/fungible dev team. It takes a certain amount of scale before the tradeoff is worth it. Same for things like reactive programming, etc. The quality of your videos, in both content and presentation, is strong enough that it's deterring me from taking on that kind of load for a S&Gs channel of my own! I'd love to see more stuff 100% (i'd do the twitch stuff but it's a bit of a time commitment and i completely suck at multi-tasking so i can't really do it in the background)
@gayedemiray Жыл бұрын
insanely high quality video. thank you for all the information!
@wety7892 жыл бұрын
I love this style of video! The live stuff is neat as well but I find these are much easier to focus on
@YatesyTea2 жыл бұрын
Thank you for this one, was really informative to me. Can't believe I wasn't taught this in University 😂
@reegnz2 жыл бұрын
What about gzip, brotli, etc? I don't worry too much about json size overhead as long as the client supports compression (especially brotli).
@nrwchd Жыл бұрын
i think you fall a sleep during the video parsing json is slow
@mordicai4296 Жыл бұрын
I’m making a VR mmo, this video was exactly what I was looking for. I need to share player state as fast as possible.
@blackfrog15342 жыл бұрын
yah yahh, prime is on a roll! This is the best tech content on the internet if you ask me. Would be delighted if you pumped up even more of these. Plus the streams were you write the code for these experiments are so much fun :)
@mosslightstudio2 жыл бұрын
love it when the scienceagen comes in to do some blazingly fast research for us all
@mariumbegum73252 жыл бұрын
Great video, some interesting points mentioned here. Looking forward to seeing more
@adam86852 жыл бұрын
Love this type of video, I wasn't aware of Deku before watching. I'd be keen to see a breakdown of Protobuf vs Deku We used Twitch's Twirp framework for Golang at a previous company I worked at for exactly this reason
@HYPERLOG__ARCHIVE2 жыл бұрын
0:08 made me laugh way too hard, thank you Mr. Prime
@MrBaudin Жыл бұрын
Great video, please do more subjects in depth. These nuggets of knowledge help us all! Thank you.
@st-jn2gk2 жыл бұрын
W video, more more more. Too many videos out there aimed at beginners, very few aimed at intermediates (other than theo and fireship). Love the content. Love the streams. Good job dad.
@zeachco Жыл бұрын
I just love your content, it's smart, useful, in dept and quite entertaining!
@calder-ty2 жыл бұрын
Love these style videos. Keep it up!
@ThePrimeagen2 жыл бұрын
Thank you. I feel like it's a fun break from the VIM content
@rhinni2 жыл бұрын
I read somewhere that when in JS you want to init with a lot of object data, it's faster to JSON encode it and then let JS JSON decode it, just because JSON parsing parsing is faster than letting the JS parser parse all the object data on loading the page/script.
@jeremykothe28472 жыл бұрын
That is true, similar to how it is faster to use element.innerHTML = "...." than programatically add a div, set properties etc. But it's still faster to use a binary format (done properly).
@pif50232 жыл бұрын
Yes!!! Gold content!!! I have never heard any other dev talking about serialization encodings!!!!
@7xr1e20ln8 Жыл бұрын
Dude this guy is on another level. Love your videos.
@HaydonRyan2 жыл бұрын
This was great - we need more people to think about how efficient programs that run at scale are, as well as how efficient the data we send through the net. There is this horrible trend of as chips and network transmission gets faster to just send things using the least efficient method. I totally agree with your point though on being able to inspect the payload is helpful for debugging what's going on though.
@TheyCallMeIce2 жыл бұрын
Deku looks interesting, but it also looks like it was made for transferring objects of a known structure, and mainly size. Like, what if an object contains an array of an unknown size? Or even simpler, how do you transfer strings?
@gaeel330 Жыл бұрын
"The schema is within the JSON" can be a feature sometimes (maybe?). I'm wondering if there are formats where the schema can appear in the header, and then the data is just packed binary.
@yoni532s9M5w2 жыл бұрын
One of the easiest subscribing of my life, top notch quality
@ThePrimeagen2 жыл бұрын
ty ty ty ty
@solidsloth12 жыл бұрын
It's like JSON is Recoome and binary is Goku.
@muhamedkarajic11 ай бұрын
Exactly what I was looking for. Thank you!
@s0er3n332 жыл бұрын
but my eyes can read json blazingly fast
@focusEngineered Жыл бұрын
I loved this idea, And this is the first time I see how slow is JSON, I never thought about it before Thanks for the great ideas and videos, Please keep up the good work I love watching your videos, it is useful, funny and interesting to me
@adelarsq2 жыл бұрын
I don't even work with Rust and NodeJS, but it's pretty fun your videos. Keep going!
@aaronm66752 жыл бұрын
Love the DEEP DIVE 🔥🔥🔥🔥🔥
@RedHatTurtle Жыл бұрын
Damn, when that wild Thomas Dolby appeared I couldn't help myself from laughing
@FPChris2 жыл бұрын
Yoda voice: Jason. You seek Jason… for some reason that’s what plays in my head.
@lastink4442 жыл бұрын
MY GOD, this was so satisfying to watch and listen to
@bsqrd2 жыл бұрын
I would like to take a moment and say the videos you put out are excellent, both in educational and entertainment value. Very much appreciated! ✨BLAZINGLY AWESOME ✨
@aus10d Жыл бұрын
this was really beneficial and interesting. thanks for posting it. i learned a lot
@victorvirgiliocalderonsoto86892 жыл бұрын
I loved this video! Thank you Primeagen
@nordern12 жыл бұрын
Human readable, dynamic formats are not binary. I am shook. I agree that people often use JSON where they don't really need a human readable format, but they have their place. I would actually be interested if there are human readable formats that are much faster to parse/generate. Also 10x difference is surprisingly low. Like, we are comparing a format that needs to be parsed to something that basically can get flushed straight to memory. JSON seems pretty amazingly fast for what it does
@ThePrimeagen2 жыл бұрын
It was the smallest message I could send. As a message grew the performance got closer to 40 to 100x. Remember I'm also fully parsing the message. This isn't flat buffers where it lazily parses message access At that point you're talking a thousand x
@nordern12 жыл бұрын
@@ThePrimeagen Fair point
@metalpachuramon Жыл бұрын
Maybe try with gson? Memory-wise it'll use roughly the same amount of memory but speed-wise, I think it'll definitely do better + the readability + the embedded schema
@SheldonHull2 жыл бұрын
I'm saying it the french way from now on. Thank you for making my life richer!
@vedrankaracic2652 жыл бұрын
Love these videos! Keep 'em coming!
@ThePrimeagen2 жыл бұрын
Trying!
@codewithguillaume2 жыл бұрын
IT FEELS LIKE IM PRONONCING IT WITH MY FRENCH ACCENT
@playea1232 жыл бұрын
This is awesome! More of these deep dives please!!
@MattWyndham2 жыл бұрын
JSON maximizes readability, whereas deku maximizes speed. Same tradeoff between Rust and Python
@itjustworks48242 жыл бұрын
Keep them coming !!! Lets make blazingly synonym for ThePrimeagen