WEBVTT

00:00.270 --> 00:02.280
So what would be the size of an India.

00:02.370 --> 00:07.560
You can just let's make it a different topic out here memory consumed by

00:11.580 --> 00:12.850
an M.D..

00:13.740 --> 00:14.360
Right.

00:14.400 --> 00:23.610
So if I make the size markdown and say memory consume man in the day and of course I'm going to write

00:23.610 --> 00:29.700
down here that what is going to be decisive first of all the Indiani is there in my and B list if you

00:29.700 --> 00:31.740
remember and B list right.

00:31.910 --> 00:37.330
So that you can just print out for now you can just sprint.

00:37.680 --> 00:46.140
Now a number by Airey does not consist of references to objects they directly consist of values it sets

00:46.230 --> 00:53.880
these values 24:12 57 are the values in the end the list itself and B list does not contain references

00:53.880 --> 00:54.890
to objects.

00:54.900 --> 00:56.880
So what you see is size of any list.

00:56.940 --> 01:01.800
That is the actual size that is the actual memory that has no other memory being consumed rather than

01:01.800 --> 01:04.980
the size of list directly.

01:04.980 --> 01:15.560
So if I would just get the size of the list so let's say size of NUMP by Attie size by me and I would

01:15.560 --> 01:26.050
say that's equal to that's equal to I can say I'll tell I would put it up as size.

01:26.060 --> 01:28.190
I will use though function size.

01:28.250 --> 01:32.590
And then I would say I would pause at the end just right.

01:32.620 --> 01:41.370
So now if I print the size of NPR-A How much would one see to it.

01:41.390 --> 01:43.490
Can you see just the three elements.

01:43.490 --> 01:44.690
What is the size of it.

01:44.750 --> 01:45.870
What is the size of a list.

01:45.890 --> 01:49.430
And what is the size of it and we are just three elements.

01:49.550 --> 01:53.590
You can you can you can understand how huge.

01:53.720 --> 02:00.860
How huge memory is being consumed by a list whereas in NBA idea or number three the memory consumed

02:00.860 --> 02:02.180
this very less.

02:02.180 --> 02:07.220
Now if I keep increasing the number of elements in the list let me just keep changing the number of

02:07.220 --> 02:07.660
elements.

02:07.670 --> 02:09.600
Now this is the number of elements right.

02:09.600 --> 02:10.170
Where is it.

02:11.240 --> 02:13.840
Let's say this is 24 12:57.

02:13.930 --> 02:16.450
Is that this is a list.

02:16.520 --> 02:18.130
Let me just copy it up.

02:18.530 --> 02:21.740
Let me bring it up here in.

02:22.160 --> 02:22.570
OK.

02:22.640 --> 02:25.550
Just before print list let me just put it up here.

02:25.670 --> 02:30.380
Now instead of saying 57 let me just add a few more elements right.

02:33.720 --> 02:34.470
Right.

02:34.620 --> 02:39.710
And if I add a few elements and check it up let me just.

02:39.720 --> 02:45.040
So size of list is 152 empty list is this much.

02:45.180 --> 02:47.010
Let me bring it up.

02:47.100 --> 02:54.270
Size of list of 0 size of each element total size for 60.

02:54.570 --> 03:01.230
Let's do a memory consumed by an NPR-A and wait I have two.

03:01.270 --> 03:03.230
I haven't created the NPR-A.

03:03.340 --> 03:10.570
So the NPR is empty list will be created from the list I need to created from the list so I'm going

03:10.570 --> 03:22.700
to say N.P. dot dot at a right and I need to pass the list so that I get that up.

03:23.520 --> 03:30.420
And now I print the size of an interior just to have a look at the size of the Z who what this one for

03:30.490 --> 03:33.470
me in comparison to 460.

03:33.510 --> 03:38.810
That's you trade for 60 is the huge size for a list.

03:38.820 --> 03:44.820
So you can just imagine how much memory is being consumed by list hands.

03:44.910 --> 03:54.060
And numpad is is much more efficient with respect to the memory when it comes when it comes to memory

03:54.060 --> 03:54.690
consumption.

03:54.720 --> 03:57.880
Of course there are a few more things that we're going to have a look at.

03:58.070 --> 04:04.980
And we're going to see is it just the memory or is there something else more which is quite compelling

04:05.040 --> 04:06.380
for an umpire.

04:06.720 --> 04:09.500
And that's we can just mention it out here.

04:09.530 --> 04:17.400
Nick recolored as when I say memory consumed by an NPR-A after memory I can just I can just say the

04:17.400 --> 04:19.160
next thing that we need to check up.

04:19.290 --> 04:19.910
OK.

04:19.980 --> 04:23.510
Or of course memory was one of the points.

04:23.520 --> 04:27.550
And as I told you the first thing was you can that you can operate in the Narey as a whole.

04:27.840 --> 04:34.350
But another point that you need to understand is the time comparison.

04:34.650 --> 04:47.690
Let's compare the time between between Vitalists and the slips and Pyrates.

04:47.940 --> 04:49.410
So let's have a look at that.

04:49.410 --> 04:53.230
So what is the time comparison between piked English and nobody is.

04:53.370 --> 04:58.340
And if you will if you will dig deeper into it.

04:58.350 --> 05:02.940
All right so what are the main advantages or what does that mean.

05:02.950 --> 05:06.030
You know what is the great difference between both of them.

05:06.090 --> 05:08.150
You can just understand them.

05:08.670 --> 05:12.480
And that's the one which is basically with respect to time.

05:12.720 --> 05:16.340
If you have a look I would rather say I'm going to import.

05:16.440 --> 05:22.830
Let me say time and that's the model that I'm going to use for figuring out.

05:22.860 --> 05:28.530
You know though let's let's make a time comparison between Python list and NPR is right.

05:28.710 --> 05:36.030
So I'm going to say part time and after Singapore time I'm going to say what is all I'm doing to create

05:37.200 --> 05:38.020
function.

05:38.070 --> 05:41.870
Let me call a function for the pipe didn't wish office.

05:42.030 --> 05:46.090
So Khaitan version of list to calculate the time.

05:46.260 --> 05:55.890
So I'm going to I'm going to create a calculator timed for the pilot in question awfullest That's one

05:56.160 --> 06:00.020
function that I have let me create another function.

06:00.020 --> 06:13.990
Let me call it calculate time for NUMP whitewash and let me go deeper into both of them.

06:13.990 --> 06:15.090
And let's have a look.

06:15.280 --> 06:15.650
OK.

06:15.670 --> 06:22.430
Now this is in the time zone there is 0 function call.

06:22.480 --> 06:23.190
There is a method.

06:23.210 --> 06:23.840
There's a function.

06:23.880 --> 06:36.830
Goldstein can you see this time function is the return to the current time the current time after the

06:36.990 --> 06:44.440
current time of the program or the program after it gets started running.

06:44.450 --> 06:49.450
Does raccoon's do the current time the current name all.

06:49.630 --> 06:51.470
You know after I started running.

06:51.470 --> 06:53.880
So what is that particular type.

06:53.930 --> 06:57.300
You can understand how we can do this.

06:57.570 --> 06:57.920
Right.

06:57.920 --> 07:06.230
So we can have let's say the current time time but time is T-1 and I'm going to say so if that is the

07:06.230 --> 07:07.290
current time.

07:07.700 --> 07:12.990
And let me just define two lists to list each of size 100.

07:13.100 --> 07:19.760
Let me call it as you know a list can be just defined by seeing range of you know range of how much

07:19.760 --> 07:24.690
of a size you want let's say 100 or 1000 that's up to you let's say thousand.

07:25.010 --> 07:26.080
And why.

07:26.270 --> 07:34.310
Let me call it as a list of another thousand elements and I'm going to make a calculation such that

07:35.410 --> 07:39.000
I wanted to be equal to you know experts why.

07:39.190 --> 07:49.920
So basically I one for every for every element in range in range.

07:49.990 --> 07:50.970
Lennox.
