Shadowing Practice: You are wasting memory - Learn English Speaking with Video

Kies een oefenmodus

Elke modus opent een volledig scherm oefenruimte.

27 zinnen
Als zinnen te kort of te lang zijn, klik op Bewerken om ze aan te passen.
1
Take a look at this C code and tell me what the output of that printf will be.
2
If you said 12, you are correct, and that's because each integer is 4 bytes wide.
3
Now, what happens if I add a character to the structure?
4
You probably already know that a character has a size of 1 byte, but if we run this program, we can see that the structure became 16 bytes.
5
This happens because of memory alignment.
6
You can imagine memory as a row of numbered boxes, where each number represents an address.
7
Each box can hold exactly one byte.
8
We know that on 64-bit machines an integer is usually four bytes.
9
For it to be aligned, its address must be a multiple of its size.
10
If a value is not aligned, on some architectures and older computers, working with it might be slower.
11
But how is the structure represented in memory by the compiler?
12
The structure is represented as a series of consecutive values, each starting at a specific padding from the beginning of of the structure.
13
The padding is needed so that each value is correctly aligned.
14
As you can see here, the value D would occupy only one byte, but three extra bytes are added so that the value C is correctly aligned.
15
If we add another character at the end of the structure, another 3 bytes of padding are added because the whole structure must be aligned to the alignment of the structure itself,
16
which is the maximum alignment between the members of the structure.
17
This way, when creating an array of this structure, the first member is always correctly aligned.
18
So to save memory, we can move our characters close together
19
so that only 2 bytes of padding are added making the whole thing 16 bytes instead of 20, while keeping everything correctly aligned.
20
We can check that in C as well.
21
As you can see, this code represents what was shown in the previous images.
22
Now take a look at the output of this.
23
If we move E, like this, the output changes.
24
Now if you want to ignore alignment and remove padding for some reason, you can use the packed attribute like this on GCC and CLang and the compiler will not insert any padding,
25
as you can see here from this output, but note that on some architectures this might make the code slower.
26
So in conclusion, if you don't wanna waste memory over padding, remember to place your structural members correctly.
27
Bye!

App downloaden

Alles wat je nodig hebt om vloeiend te spreken

AI UitspraakScoor elke zin
IPA OefeningBeheers elk geluid
WoordenschatBouw je woordenschat op
WoordenspelLeren terwijl je speelt
FOR YOU

Aanbevolen Video

Woordenschat en spreektips bij deze les

Deze video bevat 27 zinnen en 415 woorden om na te spreken. Het gesproken deel duurt 2:28. De spreker praat in een natuurlijk tempo van ongeveer 169 woorden per minuut, dicht bij een alledaags gesprek. Slechts 81% van de woorden hoort bij de 3.000 meest gebruikte Engelse woorden, dus de woordenschat is pittig.

Belangrijke woorden in deze video

10 woorden uit de video die het leren waard zijn, met uitspraak en betekenis:

WoordUitspraakBetekenis
correctly bijwoord/kəˈɹɛk(t).li/correct, juist
output zelfstandig naamwoord/ˈaʊtpʊt/productie
architecture zelfstandig naamwoord/ˈɑː.kɪˌtɛk.t͡ʃə/architectuur, bouwstijl
ignore werkwoord/ɪɡˈnɔː/negeren
conclusion zelfstandig naamwoord/kənˈkluːʒən/conclusie, einde
consecutive bijvoeglijk naamwoord/kənˈsɛkjʊtɪv/achtereenvolgend, opeenvolgend
structural bijvoeglijk naamwoord/ˈstɹʌk(t͡)ʃəɹəl/structureel
insert werkwoord/ɪnˈsɝt/invoegen
attribute zelfstandig naamwoord/ˈæt.ɹɪˌbjut/attribuut, eigenschap
integer zelfstandig naamwoord/ˈɪn.tɪ.d͡ʒə(ɹ)/geheel getal

Uitspraak om op te letten

  • De klanken “sh” en “zh”: conclusion /kənˈkluːʒən/, structural /ˈstɹʌk(t͡)ʃəɹəl/
  • Lange woorden — let op de klemtoon: architecture /ˈɑː.kɪˌtɛk.t͡ʃə/, consecutive /kənˈsɛkjʊtɪv/

Zo oefen je met deze video

  1. Luister de hele video één keer zonder te spreken en noteer de woorden die je niet kent.
  2. Begin op 0,75× snelheid, spreek zin voor zin na en ga terug naar normale snelheid zodra het makkelijk gaat.
  3. Neem jezelf op en vergelijk met het origineel; let daarbij op woorden als correctly, output, architecture.

Wat is de Shadowing-techniek?

Shadowing is een wetenschappelijk onderbouwde taalleermethode die oorspronkelijk is ontwikkeld voor professionele tolkentraining en gepopulariseerd door polyglot Dr. Alexander Arguelles. De methode is eenvoudig maar krachtig: je luistert naar native Engelse audio en herhaalt het onmiddellijk hardop — als een schaduw die de spreker volgt met slechts 1–2 seconden vertraging. In tegenstelling tot passief luisteren of grammaticadrills, dwingt shadowing je hersenen en mondspieren om echte spraakpatronen tegelijkertijd te verwerken en te reproduceren. Onderzoek toont aan dat het de uitspraaknauwkeurigheid, intonatie, ritme, verbonden spraak, luisterbegrip en spreekvaardigheid aanzienlijk verbetert — waardoor het een van de meest effectieve methoden is voor IELTS Speaking-voorbereiding en echte Engelse communicatie.

Shadowing-techniek: lees de volledige stap-voor-stap-gids →