WEBVTT 00:00.000 --> 00:11.000 Now, as chatchipiti, who are shooting vines to explain gritty, it just gave one answer. 00:11.000 --> 00:14.000 Is that that I should invite my very good friends? 00:14.000 --> 00:18.000 And as I can, I will officially say, the friend of the Godev room. 00:18.000 --> 00:20.000 Here's to the again. 00:20.000 --> 00:22.000 And he gladly accept it. 00:22.000 --> 00:34.000 And he even came up with an actual presentation of a go-go for sitting in a race car, drinking some green tea. 00:34.000 --> 00:37.000 So, give a round of applause. 00:37.000 --> 00:40.000 Okay, perfect. 00:40.000 --> 00:41.000 Thank you. 00:41.000 --> 00:46.000 Well, we're going to bring for a speed. 00:46.000 --> 00:50.000 I say, let's talk about the new green tea, go to graduate collector. 00:50.000 --> 00:52.000 So, let me introduce myself a bit. 00:52.000 --> 00:54.000 I'm so familiar at Onan. 00:54.000 --> 00:57.000 That is an AI agent in the cloud. 00:57.000 --> 01:00.000 I'm an open source and to see as that in the computer. 01:00.000 --> 01:02.000 I really love open source. 01:02.000 --> 01:06.000 This is why, first thing is, probably my favorite conference in the world. 01:06.000 --> 01:11.000 I'm not big fan of the knowledge of understanding things, how things work and the truth. 01:11.000 --> 01:13.000 Also, I have a book out there. 01:13.000 --> 01:15.000 I wrote more on a race API as a moment ago. 01:15.000 --> 01:20.000 But recently, I started the blog about how things work and the truth. 01:20.000 --> 01:24.000 So, if you, well, there's a series of posts about the compiler. 01:24.000 --> 01:26.000 Another one about postgres. 01:26.000 --> 01:28.000 I'm going to write another about five systems. 01:28.000 --> 01:30.000 I'm about a development time. 01:30.000 --> 01:32.000 Very soon. 01:32.000 --> 01:34.000 So, yep. 01:34.000 --> 01:35.000 That's me. 01:35.000 --> 01:40.000 We are going to talk here about the new green tea garbage collector. 01:40.000 --> 01:46.000 But for that, I want to start explaining how the current garbage collector, 01:46.000 --> 01:52.000 the quality of the collector that is in the 1.25 version, is it works. 01:52.000 --> 01:55.000 And then I'm going to talk a bit about the memory indicator, 01:55.000 --> 02:00.000 because I think it's interesting for understanding better how the green tea garbage collector works. 02:00.000 --> 02:07.000 And then I'm going to get into the real innovation behind the green tea garbage collector. 02:08.000 --> 02:13.000 Well, as always, this is something that I, I'm not in the go team or something like that. 02:13.000 --> 02:16.000 I just learned this by reading the code, exploring things, 02:16.000 --> 02:18.000 reading the documentation, all that stuff. 02:18.000 --> 02:21.000 So, doing my investigation, doing my homework. 02:21.000 --> 02:25.000 So, there's some simplification. 02:25.000 --> 02:27.000 So, oversimplification, certain things. 02:27.000 --> 02:31.000 But I think it explained more or less how it works. 02:31.000 --> 02:35.000 So, let's jump into the go classic garbage collector. 02:35.000 --> 02:39.000 The one that is in the 1.25 version. 02:39.000 --> 02:45.000 The go garbage collector, it's not super special in that sense. 02:45.000 --> 02:48.000 It's a regular market sweep garbage collector. 02:48.000 --> 02:52.000 It's a technique that is using many other garbage collectors. 02:52.000 --> 02:57.000 The technique in the market sweep is finding all the root objects. 02:57.000 --> 03:00.000 So, the objects that are truly accessible for sure, 03:00.000 --> 03:03.000 because they are global buy-outs, for example, 03:03.000 --> 03:08.000 and start exploring them and finding and tracing objects, 03:08.000 --> 03:11.000 finding what objects point to another objects, et cetera, 03:11.000 --> 03:13.000 and marking them. 03:13.000 --> 03:16.000 And whenever you finish marking everything, whatever it is, 03:16.000 --> 03:19.000 and being rich, whatever it is, and being marked, 03:19.000 --> 03:21.000 it's a ritual. 03:21.000 --> 03:23.000 So, you can swipe that. 03:23.000 --> 03:25.000 So, that's the market sweep algorithm. 03:25.000 --> 03:27.000 Let's see here. 03:27.000 --> 03:31.000 This is an example of how will work. 03:31.000 --> 03:35.000 The first thing is those root objects, those root objects 03:35.000 --> 03:42.000 from global buy-outs, and the stack of the go routines. 03:42.000 --> 03:46.000 So, it is going to scan the stacks of the go routines, 03:46.000 --> 03:49.000 scan all the global buy-outs, and try to find objects 03:49.000 --> 03:51.000 that point to something. 03:51.000 --> 03:54.000 For example, imagine that we have two alive group objects, 03:54.000 --> 03:56.000 and they have two pointers. 03:56.000 --> 03:59.000 So, it's going to say, oh, I have two objects here 03:59.000 --> 04:01.000 that I have to scan. 04:01.000 --> 04:03.000 Because I need to scan those objects, 04:03.000 --> 04:07.000 and can be many, what I'm going to do is accumulate those objects 04:07.000 --> 04:09.000 in a work stack. 04:09.000 --> 04:11.000 It's important to understand that that's a stack, 04:11.000 --> 04:14.000 because it's a last in-first out, 04:14.000 --> 04:18.000 and that gives the map face of the garbage collector's set in properties. 04:18.000 --> 04:21.000 So, let's trace how it goes. 04:21.000 --> 04:22.000 I found these two objects. 04:22.000 --> 04:24.000 I put those two objects in the stack. 04:24.000 --> 04:29.000 So, I pick from the top of the stack, 04:29.000 --> 04:31.000 and I take that object. 04:31.000 --> 04:33.000 So, I start scanning that object. 04:33.000 --> 04:36.000 While I'm scanning that object, I found this or the one. 04:36.000 --> 04:38.000 So, I put that in the stack, 04:38.000 --> 04:42.000 and mark this as a visit, it's already done, 04:42.000 --> 04:44.000 and done with that object. 04:44.000 --> 04:47.000 So, then I have to scan another object. 04:47.000 --> 04:50.000 So, I pick one from the stack from the top of the stack. 04:50.000 --> 04:52.000 There's one that I just added. 04:52.000 --> 04:53.000 So, it's there. 04:53.000 --> 04:55.000 I visited that. 04:55.000 --> 04:57.000 I keep going and putting in the stack, 04:57.000 --> 04:59.000 scanning, putting in the stack, 04:59.000 --> 05:02.000 scanning, putting in the stack, scanning. 05:02.000 --> 05:05.000 It's important to see that this stack, 05:05.000 --> 05:10.000 and that is going to lead into a depth-first scanning. 05:10.000 --> 05:15.000 So, we are moving down the path of one object. 05:15.000 --> 05:17.000 And whenever we finish with that, 05:17.000 --> 05:21.000 we go back and keep going and get all over the ramifications 05:21.000 --> 05:22.000 of that objects. 05:22.000 --> 05:24.000 And whenever I reach that point, 05:24.000 --> 05:27.000 where I visited the one, I visited that one. 05:27.000 --> 05:28.000 There's no more objects. 05:28.000 --> 05:31.000 So, I go into go back to the stack, 05:31.000 --> 05:33.000 and pick one from the top, 05:33.000 --> 05:36.000 that is the second one that we found. 05:36.000 --> 05:40.000 So, we go there and do all the scanning, 05:40.000 --> 05:42.000 the scanning, and find the objects, 05:42.000 --> 05:44.000 putting in the stack, and all the stuff. 05:44.000 --> 05:47.000 Now, I at the result point where the work queue is empty. 05:47.000 --> 05:50.000 So, what the work stack is empty. 05:50.000 --> 05:53.000 So, everything else in the memory, 05:53.000 --> 05:55.000 it's unreachable. 05:55.000 --> 05:57.000 So, I can just swipe that. 05:57.000 --> 06:01.000 So, this is how the mark face of the go garbage collector works. 06:01.000 --> 06:03.000 I'm going to focus on the mark face, 06:03.000 --> 06:06.000 because the green tea innovation, 06:06.000 --> 06:09.000 it's basically down in the mark face. 06:09.000 --> 06:15.000 The sweeping of the unreachable objects, 06:15.000 --> 06:19.000 it's down exactly the same in both garbage collectors. 06:19.000 --> 06:25.000 So, let's talk a bit about the memory locator. 06:25.000 --> 06:29.000 The memory locator is a piece of the runtime 06:29.000 --> 06:31.000 that decides where your data, 06:31.000 --> 06:33.000 where your variables are stored. 06:33.000 --> 06:38.000 So, whenever you ask for a new object, 06:38.000 --> 06:40.000 it's going to ask the memory locator 06:40.000 --> 06:43.000 and the memory locator is going to follow up very smart approach, actually. 06:43.000 --> 06:46.000 It's going to divide all the data 06:46.000 --> 06:48.000 in what they call mspans. 06:48.000 --> 06:50.000 mspans is a memory spam, 06:50.000 --> 06:55.000 it's just a set of pages, a set of memory pages 06:55.000 --> 06:57.000 of 8kW each. 06:57.000 --> 07:02.000 That are that only contains objects of that size. 07:02.000 --> 07:05.000 That's not exactly true. 07:05.000 --> 07:08.000 They contain objects up to that size. 07:08.000 --> 07:10.000 So, oh sorry. 07:10.000 --> 07:13.000 They contain objects up to that size. 07:13.000 --> 07:16.000 That means that, for example, 07:16.000 --> 07:20.000 if you have an object of 22 bytes, 07:20.000 --> 07:23.000 it's going to fall in the span of 24 bytes, 07:23.000 --> 07:26.000 because it's the first one that is going to be able to store that. 07:26.000 --> 07:30.000 But the pages are divided in as lots of that size. 07:30.000 --> 07:35.000 So, if you have a page that is part of the 24 bytes spam, 07:35.000 --> 07:39.000 it's going to have as lot of 24 bytes. 07:39.000 --> 07:42.000 So, everything is same size inside that page. 07:42.000 --> 07:46.000 So, you can, it's easy to parallelize the things. 07:46.000 --> 07:48.000 I mean, easy to index, easy to find the things. 07:48.000 --> 07:50.000 So, it's a very smart approach, 07:50.000 --> 07:58.000 and we are going to see how the green tickabets collector leverage that later. 07:58.000 --> 08:04.000 So, let's talk about what is the green tick here, 08:04.000 --> 08:09.000 how green tick it's gaining all these performance. 08:10.000 --> 08:14.000 The idea is there's some difference here. 08:14.000 --> 08:18.000 This is what we saw before with the green tick, 08:18.000 --> 08:21.000 with the regular, the classic garbage collector. 08:21.000 --> 08:24.000 But now, what we are introducing here is those pages 08:24.000 --> 08:26.000 from the memory allocator. 08:26.000 --> 08:29.000 Those pages that have very specific size. 08:29.000 --> 08:32.000 So, all these objects belong to specific pages. 08:32.000 --> 08:36.000 So, those of these are all in the same size, 08:36.000 --> 08:41.000 and all well organized and well structured. 08:41.000 --> 08:46.000 Again, so, sorry, let me go back to this. 08:46.000 --> 08:48.000 In the garbage collector, 08:48.000 --> 08:50.000 what's the problem of the garbage collector? 08:50.000 --> 08:51.000 What's the problem? 08:51.000 --> 08:53.000 The current garbage collector. 08:53.000 --> 08:57.000 The problem is whenever we start scanning in the marketplace, 08:57.000 --> 08:59.000 we are going to go to one object, 08:59.000 --> 09:02.000 and we are going to jump into another object, 09:02.000 --> 09:04.000 and then jump into another object, 09:05.000 --> 09:07.000 and you are going to jump in all over the memory. 09:07.000 --> 09:10.000 So, it's not predictable what I going to scan next. 09:10.000 --> 09:13.000 It's not predictable for the CPU. 09:13.000 --> 09:14.000 It's not predictable. 09:14.000 --> 09:18.000 It's not, there's no data locality on that. 09:18.000 --> 09:21.000 So, I can jump all over the memory. 09:21.000 --> 09:27.000 So, that is going to fight really hard against the CPU cache 09:27.000 --> 09:30.000 and the CPU pipelines. 09:30.000 --> 09:34.000 So, the CPU can leverage prediction of what you are going to index. 09:34.000 --> 09:38.000 The CPU can't leverage the current cache 09:38.000 --> 09:41.000 that already have in the L1 cache of the CPU. 09:41.000 --> 09:43.000 So, it has to go to memory. 09:43.000 --> 09:44.000 That sounds like very fast, 09:44.000 --> 09:46.000 but it's compared to L1 cache. 09:46.000 --> 09:49.000 It's 100 times lower, 09:49.000 --> 09:50.000 something like that. 09:50.000 --> 09:51.000 It's crazy, it's lower, 09:51.000 --> 09:54.000 and it's doing that all the time 09:54.000 --> 09:56.000 because you are jumping all over the memory. 09:56.000 --> 09:58.000 So, the green tea trick, 09:58.000 --> 10:01.000 basically, is instead of scanning 10:01.000 --> 10:02.000 of just one after another, 10:02.000 --> 10:04.000 it starts scanning pages. 10:04.000 --> 10:07.000 So, it starts thinking about the memory 10:07.000 --> 10:09.000 and about the memory scanning 10:09.000 --> 10:11.000 in terms of pages. 10:11.000 --> 10:13.000 So, we have here, 10:13.000 --> 10:17.000 our object's organizing pages, 10:17.000 --> 10:21.000 then you have also here a set of a couple of minutes. 10:21.000 --> 10:22.000 One is saying, 10:22.000 --> 10:25.000 is this object has been seen already in this page? 10:25.000 --> 10:27.000 And the other one is, 10:27.000 --> 10:30.000 is this object has been a scanner already? 10:30.000 --> 10:33.000 And that's another thing 10:33.000 --> 10:35.000 that we are going to see how it works 10:35.000 --> 10:38.000 because we are going to go through the process. 10:38.000 --> 10:40.000 The other thing, 10:40.000 --> 10:44.000 it's no longer a stack of objects. 10:44.000 --> 10:46.000 Now, it's a queue, 10:46.000 --> 10:48.000 so, last thing, first out, 10:48.000 --> 10:50.000 sorry, 10:50.000 --> 10:52.000 first thing, first out, 10:53.000 --> 10:55.000 it's a queue, 10:55.000 --> 10:57.000 but also it's not a foggex, 10:57.000 --> 10:58.000 it's a pages. 10:58.000 --> 11:01.000 So, we are the unit of work 11:01.000 --> 11:04.000 for the new go garbage collector, 11:04.000 --> 11:07.000 it's going to be per page. 11:07.000 --> 11:09.000 So, let's see how it works. 11:09.000 --> 11:11.000 Imagine that I have these two 11:11.000 --> 11:13.000 root objects that I found 11:13.000 --> 11:19.000 in the growth on global variables, 11:19.000 --> 11:22.000 so why I'm also in coding stocks? 11:22.000 --> 11:23.000 I found these two objects 11:23.000 --> 11:26.000 that I'm pointing to two objects in this page. 11:26.000 --> 11:29.000 So, I just marked that object in the page as seen 11:29.000 --> 11:32.000 and put that page in the queue. 11:32.000 --> 11:37.000 So, next step, I'm going to scan that page. 11:37.000 --> 11:38.000 I scan that page, 11:38.000 --> 11:40.000 I found these two objects, 11:40.000 --> 11:42.000 I have to scan these two objects 11:42.000 --> 11:44.000 that are the ones that have been seen. 11:44.000 --> 11:45.000 So, I say, 11:45.000 --> 11:48.000 oh, they are pointing to other two objects, 11:48.000 --> 11:50.000 so I marked the other two objects in the other page 11:50.000 --> 11:53.000 and put that page in the queue again. 11:53.000 --> 11:56.000 And now, those objects are already scanned. 11:56.000 --> 11:59.000 So, next step, I take another page. 11:59.000 --> 12:02.000 So, I started scanning that page from the queue 12:02.000 --> 12:04.000 and I found another two objects, 12:04.000 --> 12:07.000 so I marked those objects seen in the other page 12:07.000 --> 12:09.000 and put that page in the queue 12:09.000 --> 12:12.000 and started scanning that page and so on. 12:12.000 --> 12:14.000 This one case here, 12:14.000 --> 12:17.000 where you can see that the first object, 12:17.000 --> 12:19.000 the first object in the page, 12:19.000 --> 12:23.000 is pointing to the second object in the page that I already scanned. 12:23.000 --> 12:25.000 But that's okay. 12:25.000 --> 12:27.000 The green tea can scan again, 12:27.000 --> 12:29.000 multiple pages. 12:29.000 --> 12:31.000 Can scan again the pages 12:31.000 --> 12:34.000 for finding objects that haven't been seen before. 12:34.000 --> 12:36.000 So, what we are going to do is, 12:36.000 --> 12:38.000 magazine there, 12:38.000 --> 12:40.000 and we are going to go again to that page 12:40.000 --> 12:42.000 and scan that and go there 12:43.000 --> 12:46.000 and keep going that we revisited some pages 12:46.000 --> 12:47.000 because it needed. 12:47.000 --> 12:50.000 And we finally have 12:50.000 --> 12:52.000 a no more pages in the queue, 12:52.000 --> 12:54.000 so we have a scan everything 12:54.000 --> 12:57.000 and everything else is unreachable. 12:57.000 --> 13:00.000 Another thing that is important to understand here 13:00.000 --> 13:02.000 is because it's a queue 13:02.000 --> 13:03.000 and because it's a scan in things 13:03.000 --> 13:05.000 and marking in other pages, 13:05.000 --> 13:07.000 this process is very kind of linear. 13:07.000 --> 13:09.000 I'm marking this page and then the next page 13:09.000 --> 13:10.000 and then the next page. 13:10.000 --> 13:12.000 But the reality is probably 13:12.000 --> 13:15.000 your objects are pointing to seven different pages. 13:15.000 --> 13:17.000 So, you're scanning the next page 13:17.000 --> 13:19.000 and you're pointing to other seven different pages 13:19.000 --> 13:21.000 and you're scanning the next page and all the pages 13:21.000 --> 13:23.000 and what is going to happen 13:23.000 --> 13:26.000 is it's going to accumulate 13:26.000 --> 13:29.000 scenes, bits, scenes, flags 13:29.000 --> 13:30.000 in those pages. 13:30.000 --> 13:32.000 And whenever you reach that page, 13:32.000 --> 13:34.000 maybe you scan in one go, 13:34.000 --> 13:39.000 you scan 70 objects or free objects 13:39.000 --> 13:42.000 or whatever number of objects 13:42.000 --> 13:44.000 but you are going to accumulate that. 13:44.000 --> 13:46.000 So, this way, 13:46.000 --> 13:49.000 the GoGarbit Collector has the advantage 13:49.000 --> 13:53.000 of scanning a very localized 13:53.000 --> 13:56.000 memory objects at one time. 13:56.000 --> 13:59.000 So, it's going to go in a page and say, 13:59.000 --> 14:03.000 now I have to scan 13 objects. 14:03.000 --> 14:05.000 And those setting objects 14:05.000 --> 14:07.000 are going to be my L1 cache. 14:07.000 --> 14:10.000 So, I'm going to do all very quickly 14:10.000 --> 14:13.000 because it's all fresh and I don't have to go to memory 14:13.000 --> 14:15.000 and all back and forth of the time. 14:15.000 --> 14:17.000 So, that's the main innovation. 14:17.000 --> 14:21.000 So, let's see how the banking work, 14:21.000 --> 14:23.000 the page-shaking work. 14:23.000 --> 14:25.000 Imagine that you have this scene bitmap 14:25.000 --> 14:28.000 and this scan bitmap here. 14:28.000 --> 14:30.000 So, I have to scan the page. 14:30.000 --> 14:33.000 So, I started looking for the first one. 14:33.000 --> 14:35.000 It's pending, now it's not pending 14:35.000 --> 14:36.000 because it's has been already scanned. 14:36.000 --> 14:38.000 The second one is pending, now, 14:38.000 --> 14:40.000 because having been seen yet 14:40.000 --> 14:42.000 is the third one pending, yes, 14:42.000 --> 14:44.000 because having seen but not scanned. 14:44.000 --> 14:45.000 So, what I'm going to do here, 14:45.000 --> 14:48.000 this is another bitmap is one bit that's saying, 14:48.000 --> 14:51.000 oh, the object in this position 14:51.000 --> 14:53.000 needs to be scanned. 14:53.000 --> 14:56.000 What it's going to do is going to expand that object 14:56.000 --> 14:59.000 towards, is going to do a bitmap of words. 14:59.000 --> 15:01.000 Everything is a one there. 15:01.000 --> 15:04.000 That is saying, all these words, 15:04.000 --> 15:08.000 all these lots that cool is stored 15:08.000 --> 15:13.000 a pointer are something that we can, 15:13.000 --> 15:16.000 that can be a pointer. 15:16.000 --> 15:18.000 Okay, add and live pointer. 15:18.000 --> 15:19.000 So, I'm scanning that. 15:19.000 --> 15:22.000 So, what I do is getting this pointer's map. 15:22.000 --> 15:24.000 The pointer's map is saying, 15:24.000 --> 15:27.000 for this object, these are the words 15:27.000 --> 15:30.000 or these are the positions that are stored on address. 15:30.000 --> 15:33.000 So, it's going to compare that bitmap and say, 15:33.000 --> 15:38.000 oh, this is the, these are the positions in the memory 15:38.000 --> 15:43.000 that has memory address that I have to add to the queue 15:43.000 --> 15:45.000 and all that stuff. 15:45.000 --> 15:48.000 Then, I go to the next one, 15:48.000 --> 15:50.000 expand the words, compare to the pointer map 15:50.000 --> 15:52.000 and I have another two pointers. 15:52.000 --> 15:55.000 So, those four pointers points to all the pages. 15:55.000 --> 15:58.000 I mark that in the pages and put that in the queue. 15:58.000 --> 16:01.000 So, that is how the page checking word. 16:01.000 --> 16:04.000 But there's something else that is pretty cool. 16:04.000 --> 16:05.000 The hardware boost. 16:05.000 --> 16:10.000 So, the go, the go graphics collect, the go green tick 16:10.000 --> 16:15.000 that it's collector, is using ABH5012 instructions 16:15.000 --> 16:19.000 that are seen instructions, single instruction, multiple data 16:19.000 --> 16:22.000 that are set of instructions that allows you 16:22.000 --> 16:25.000 to parallelize certain operations at CPU level 16:25.000 --> 16:28.000 where it's pretty cool. 16:29.000 --> 16:31.000 To get some numbers, they go green tick 16:31.000 --> 16:35.000 that's collector, it's saying that it can save 16:35.000 --> 16:38.000 in the mark face of the go graphics collector 16:38.000 --> 16:41.000 between a 10% to 40%, 16:41.000 --> 16:47.000 but with the ABH, the ABH instructions, 16:47.000 --> 16:51.000 it's giving a 10% extra. 16:51.000 --> 16:54.000 The ABH instructions is only in very modern CPU, 16:54.000 --> 16:58.000 so don't expect your two years laptop or something 16:58.000 --> 17:02.000 like that to be able to run these things. 17:02.000 --> 17:06.000 I don't know exactly the set of instructions, 17:06.000 --> 17:08.000 but you need to have a specific set of instructions 17:08.000 --> 17:11.000 supported in your CPU for getting this work. 17:11.000 --> 17:15.000 Well, what it's going to do in this case 17:15.000 --> 17:18.000 is you're going to have this bin map of seeing a scan 17:18.000 --> 17:21.000 and instead of going, oh, let me compare this one, 17:21.000 --> 17:23.000 let me compare this one, it's going to go in one go. 17:23.000 --> 17:26.000 So in one go is oh, these are the pending ones 17:26.000 --> 17:28.000 because I'm going to parallelize everything 17:28.000 --> 17:30.000 and I'm going to get the scanning there. 17:30.000 --> 17:32.000 And then I'm going to say oh, I'm going to expand them 17:32.000 --> 17:34.000 and just expand everything of ones. 17:34.000 --> 17:37.000 It's one go for the CPU. 17:37.000 --> 17:40.000 And then you compare that with the pointers map 17:40.000 --> 17:42.000 and go there and boom, one go. 17:42.000 --> 17:45.000 So it's a 10% extra performance 17:45.000 --> 17:48.000 in the mark face of the garbage collector, 17:48.000 --> 17:51.000 so it's a pretty good boost. 17:52.000 --> 17:54.000 There's a catch anyway. 17:54.000 --> 17:56.000 There's a catch. 17:56.000 --> 17:59.000 The goal garbage collector is the green ticker 17:59.000 --> 18:02.000 which collector is a great improvement in general, 18:02.000 --> 18:07.000 but there can be situations where the performance boost 18:07.000 --> 18:13.000 is not there or can even be a regression on performance. 18:13.000 --> 18:16.000 This will be kind of the case. 18:16.000 --> 18:19.000 Imagine that your data is shaping memory 18:19.000 --> 18:22.000 in a way that every time that you scan something, 18:22.000 --> 18:24.000 it points to our new page 18:24.000 --> 18:26.000 and that points to another page 18:26.000 --> 18:27.000 and that points to another page 18:27.000 --> 18:30.000 and then go back to the first page and point to another page. 18:30.000 --> 18:34.000 And in app not going, in app not accumulating 18:34.000 --> 18:36.000 theme objects in the same pages 18:36.000 --> 18:40.000 is just scanning one page at a time 18:40.000 --> 18:43.000 or maybe two objects where page every single time 18:43.000 --> 18:47.000 that is going to end up not covering the extra cost, 18:48.000 --> 18:52.000 the extra content that we are doing for the grantee. 18:52.000 --> 18:57.000 In general, the expectation is a 10 to 40% improvement 18:57.000 --> 19:00.000 on the garbage on the mark face, 19:00.000 --> 19:03.000 but it's not going to be something 19:03.000 --> 19:05.000 per cent. 19:05.000 --> 19:08.000 100% sure that is going to happen. 19:08.000 --> 19:13.000 Some references, I really like the talk from Michael Kittner 19:14.000 --> 19:15.000 Nicksek. 19:15.000 --> 19:17.000 And at Gopher Kong, it's very good. 19:17.000 --> 19:19.000 Check it out. He's a gold developer. 19:19.000 --> 19:22.000 So he's a gold compiler 19:22.000 --> 19:23.000 who will run time developers. 19:23.000 --> 19:26.000 So he does a great job giving the talk. 19:26.000 --> 19:28.000 The gold debt block, 19:28.000 --> 19:30.000 it's really good, actually. 19:30.000 --> 19:32.000 That's very deep. 19:32.000 --> 19:34.000 The Gold source code is always an option 19:34.000 --> 19:35.000 to check it out. 19:35.000 --> 19:37.000 It's not the simplest code in the world, this one. 19:37.000 --> 19:40.000 So it's hard to read. 19:40.000 --> 19:43.000 One small thing, my company owner, it's giving away 19:43.000 --> 19:47.000 a $200 per month for free 19:47.000 --> 19:49.000 for open source developers. 19:49.000 --> 19:52.000 So if you are open source, then you have an open source project. 19:52.000 --> 19:55.000 Feel free to leave some cards there 19:55.000 --> 19:57.000 that you can feel free to pick them 19:57.000 --> 19:59.000 and share that with other open source developers. 19:59.000 --> 20:04.000 Up to $200 per month on free credits on the AI agent. 20:04.000 --> 20:09.000 Well, my social networks and it's everything you can do. 20:09.000 --> 20:11.000 Whatever there. 20:11.000 --> 20:13.000 And that's it. 20:13.000 --> 20:14.000 Sorry? 20:14.000 --> 20:17.000 Is the new garbage collector compatible? 20:17.000 --> 20:19.000 No, no, it's not a compacting average collector. 20:19.000 --> 20:21.000 There's no movement in the memory 20:21.000 --> 20:23.000 once the objects get there. 20:23.000 --> 20:26.000 But the memory allocator 20:26.000 --> 20:30.000 helps a lot on having the memory very compact anyway. 20:30.000 --> 20:33.000 So yeah. 20:33.000 --> 20:36.000 We have time for questions. 20:36.000 --> 20:38.000 We have five minutes. 20:38.000 --> 20:40.000 Oh. 20:40.000 --> 20:42.000 I think it's two minutes. 20:42.000 --> 20:44.000 I saw a little company. 20:44.000 --> 20:46.000 I see one very important question. 20:46.000 --> 20:52.000 I'm quickly going to hand you the microphone for the online questions. 20:52.000 --> 20:53.000 Yeah. 20:53.000 --> 20:54.000 Thank you. 20:54.000 --> 20:58.000 I might miss it in the talk, but as I understand, 20:58.000 --> 21:02.000 I've been also reading the source code of this like optimization. 21:02.000 --> 21:05.000 It works only for small objects. 21:05.000 --> 21:06.000 Oh, yeah. 21:06.000 --> 21:09.000 It's very important because technically the main like bottleneck. 21:09.000 --> 21:11.000 It's allocation and the allocation of small objects. 21:11.000 --> 21:14.000 And for big objects, we still use all like strategy. 21:14.000 --> 21:19.000 And as far as I know, there is no plans to actually extend the strategy for big objects. 21:19.000 --> 21:21.000 Because it's not efficient. 21:21.000 --> 21:22.000 Yeah. 21:22.000 --> 21:23.000 Yeah, that's a very good point. 21:23.000 --> 21:24.000 Thank you. 21:24.000 --> 21:29.000 Actually, yes, I think the bigger object is 500, 21:29.000 --> 21:31.000 112 bytes or something like that. 21:32.000 --> 21:34.000 It's only for that kind of objects. 21:34.000 --> 21:39.000 Because at the end of the day, you have a page that is 8 kilobytes. 21:39.000 --> 21:44.000 So if you have to scan big objects, 21:44.000 --> 21:49.000 you end up going to the pages for all these accounting of the pages. 21:49.000 --> 21:52.000 And all that stuff is not going to be served. 21:56.000 --> 22:00.000 Yeah, but not only that if the locality is going to be only, 22:01.000 --> 22:04.000 the max of locality that you're going to have with that is 20 objects. 22:06.000 --> 22:08.000 So it's not the benefit. 22:08.000 --> 22:10.000 It's not going to be that clear. 22:10.000 --> 22:12.000 It's more focused on the small objects. 22:12.000 --> 22:13.000 Yeah, but it's a very good point. 22:13.000 --> 22:15.000 Thank you. 22:15.000 --> 22:16.000 Thank you. 22:16.000 --> 22:19.000 And because it was a good question that's the last one for today. 22:19.000 --> 22:22.000 If you have any more garbage collecting questions, 22:22.000 --> 22:24.000 you can always invite him or I'll go to room. 22:24.000 --> 22:25.000 He'll be here all day. 22:25.000 --> 22:28.000 Do you have a hallway track somewhere, will we? 22:29.000 --> 22:31.000 No, but I'm going to be around. 22:31.000 --> 22:33.000 So I'm very, anyone. 22:33.000 --> 22:34.000 Look for him. 22:34.000 --> 22:35.000 Yeah. 22:35.000 --> 22:36.000 Remember this guy. 22:36.000 --> 22:37.000 Yeah. 22:37.000 --> 22:38.000 Thank you.