Initial commit.
This commit is contained in:
commit
b5c13fd836
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# ignore binaries
|
||||||
|
*.exe
|
||||||
|
# ignore object dumps
|
||||||
|
*.dump
|
9
00-const-vars/const.cpp
Normal file
9
00-const-vars/const.cpp
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
const int num = 7;
|
||||||
|
int res = num + 4;
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
9
00-const-vars/no-const.cpp
Normal file
9
00-const-vars/no-const.cpp
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int num = 7;
|
||||||
|
int res = num + 4;
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
24
LICENSE
Normal file
24
LICENSE
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <http://unlicense.org/>
|
11
Makefile
Normal file
11
Makefile
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
CPP=g++
|
||||||
|
|
||||||
|
EXEC := 00-const-vars/const.exe 00-const-vars/no-const.exe
|
||||||
|
|
||||||
|
all: $(EXEC)
|
||||||
|
|
||||||
|
%.exe: %.cpp
|
||||||
|
g++ $< -o $@
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(RM) $(EXEC)
|
18
README.md
Normal file
18
README.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# C++ Optimization Video Resources
|
||||||
|
|
||||||
|
This repository contains the resources I use for my C++ Optimization series on
|
||||||
|
my Odysee channel.
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
This project is composed of various small (useless) programs. The purpose is
|
||||||
|
primarily to analyze the code and resulting binary. You will require the GNU GCC
|
||||||
|
C++ compiler (`g++`) as well as the `objdump` program. After this, you can
|
||||||
|
compile all the projects by using GNU Make and simply running `make` from the
|
||||||
|
root directory of the project.
|
||||||
|
|
||||||
|
## Copyright and License
|
||||||
|
|
||||||
|
As educational resources, it is all licensed under the [Unlicense](/LICENSE).
|
||||||
|
You may freely use all content in this repository, but with no warranty nor
|
||||||
|
guarantee. I am not responsible for your usage of these resources.
|
Loading…
Reference in New Issue
Block a user