Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fx_s1615
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RealCoding2_Team1
fx_s1615
Commits
1bd08e7f
Commit
1bd08e7f
authored
4 years ago
by
Battle C Users
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
https://git.ajou.ac.kr/realcoding2_team1/battle_c_1
parents
f8dd5dd5
732d6f5d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+67
-13
67 additions, 13 deletions
README.md
multipleOutput.txt
+20
-20
20 additions, 20 deletions
multipleOutput.txt
with
87 additions
and
33 deletions
README.md
+
67
−
13
View file @
1bd08e7f
...
...
@@ -309,45 +309,38 @@ DIV_03의 경우 오차율이 조금 증가하지만 범용적으로 사용할
<br>
### 속도 테스트

*
32bit 실행 결과
1.
Multiply
MUL_03 < MUL_02 < MUL_01
<br>
MUL_03 = MUL_02 < MUL_01
32 bit에서 곱셈을 실행한 결과, cast하지 않은 것들에서 빠른 성능을 보인다는 것을 알 수 있었다.
<br>
<br>
2.
Division
DIV_01 =
DIV_03 < DIV_02
DIV_03 < DIV_02
< DIV_01
<br>
<br>
*
64bit 실행 결과
1.
Multiply
MUL_03
=
MUL_02 < MUL_01
MUL_03
<
MUL_02 < MUL_01
<br>
<br>
2.
Division
DIV_02 < DIV_03
< DIV_01
DIV_01 =
DIV_02 < DIV_03
<br>
<br>
### Sin
#### sin table
...
...
@@ -390,6 +383,67 @@ fx_1516_SinTable은 fx_s1516에 맞춰진 표이므로, fx_s1615에 맞춰 변
<br>
<br>
### double vs long long
*
double 과 long long으로 형변환을 하여 곱셈 및 나눗셈을 수행할 때, 어떤 것이 더 빠른지 측정해보았다.
1.
multiple test
```
Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls s/call s/call name
63.43 2.00 2.00 1 2.00 2.00 fx_1615_double_mul_test
12.69 2.41 0.40 1 0.40 0.40 fx_1615_longlong_mul1_test
12.05 2.79 0.38 1 0.38 0.38 fx_1615_longlong_mul2_test
12.05 3.17 0.38 1 0.38 0.38 fx_1615_longlong_mul3_test
Call graph
granularity: each sample hit covers 2 byte(s) for 0.32% of 3.17 seconds
index % time self children called name
<spontaneous>
[1] 100.0 0.00 3.17 main [1]
2.00 0.00 1/1 fx_1615_double_mul_test [2]
0.40 0.00 1/1 fx_1615_longlong_mul1_test [3]
0.38 0.00 1/1 fx_1615_longlong_mul3_test [5]
0.38 0.00 1/1 fx_1615_longlong_mul2_test [4]
-----------------------------------------------
2.00 0.00 1/1 main [1]
[2] 63.3 2.00 0.00 1 fx_1615_double_mul_test [2]
-----------------------------------------------
0.40 0.00 1/1 main [1]
[3] 12.7 0.40 0.00 1 fx_1615_longlong_mul1_test [3]
-----------------------------------------------
0.38 0.00 1/1 main [1]
[4] 12.0 0.38 0.00 1 fx_1615_longlong_mul2_test [4]
-----------------------------------------------
0.38 0.00 1/1 main [1]
[5] 12.0 0.38 0.00 1 fx_1615_longlong_mul3_test [5]
-----------------------------------------------
Index by function name
[2] fx_1615_double_mul_test [4] fx_1615_longlong_mul2_test
[3] fx_1615_longlong_mul1_test [5] fx_1615_longlong_mul3_test
```
[실행 결과 정리]
*
double이 long long으로 곱셈을 실행하는 것 보다 더 많은 시간이 소요된다는 것을 알 수 있었다.
*
fx_s1615로 표현된 값인 a를 8만큼 right shifting 해주고, b를 7만큼 right shifiting 해준 후, 두 값을 곱해주는 fx_1615_longlong_mul3_test의 실행속도가 가장 빠른 것을 알 수 있었다.
<br>
<br>
## 0819 과제
### 요구사항 명세
...
...
This diff is collapsed.
Click to expand it.
multipleOutput.txt
+
20
−
20
View file @
1bd08e7f
...
...
@@ -3,38 +3,38 @@ Flat profile:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls s/call s/call name
42.5
3 2.
13
2.
13
1 2.
13
2.
13
fx_1615_double_test
33.54
3.82
1.68
1
1.68
1.68
fx_1615_longlong_
div03
_test
1
1.98
4.42
0.
60
1 0.
60
0.
60
fx_1615_longlong_
div01
_test
1
1.58
5.00
0.
5
8 1 0.
5
8 0.
5
8 fx_1615_longlong_
div02
_test
63.4
3 2.
00
2.
00
1 2.
00
2.
00
fx_1615_double_
mul_
test
12.69
2.41
0.40
1
0.40
0.40
fx_1615_longlong_
mul1
_test
1
2.05
2.79
0.
38
1 0.
38
0.
38
fx_1615_longlong_
mul2
_test
1
2.05
3.17
0.
3
8 1 0.
3
8 0.
3
8 fx_1615_longlong_
mul3
_test
Call graph
granularity: each sample hit covers 2 byte(s) for 0.2
0
% of
5.00
seconds
granularity: each sample hit covers 2 byte(s) for 0.
3
2% of
3.17
seconds
index % time self children called name
<spontaneous>
[1] 100.0 0.00
5.00
main [1]
2.
13
0.00 1/1 fx_1615_double_test [2]
1.68
0.00 1/1 fx_1615_longlong_
div03
_test [3]
0.
60
0.00 1/1 fx_1615_longlong_
div01
_test [
4
]
0.
5
8 0.00 1/1 fx_1615_longlong_
div0
2_test [
5
]
[1] 100.0 0.00
3.17
main [1]
2.
00
0.00 1/1 fx_1615_double_
mul_
test [2]
0.40
0.00 1/1 fx_1615_longlong_
mul1
_test [3]
0.
38
0.00 1/1 fx_1615_longlong_
mul3
_test [
5
]
0.
3
8 0.00 1/1 fx_1615_longlong_
mul
2_test [
4
]
-----------------------------------------------
2.
13
0.00 1/1 main [1]
[2]
42.7
2.
13
0.00 1 fx_1615_double_test [2]
2.
00
0.00 1/1 main [1]
[2]
63.3
2.
00
0.00 1 fx_1615_double_
mul_
test [2]
-----------------------------------------------
1.68
0.00 1/1 main [1]
[3]
33
.7
1.68
0.00 1 fx_1615_longlong_
div03
_test [3]
0.40
0.00 1/1 main [1]
[3]
12
.7
0.40
0.00 1 fx_1615_longlong_
mul1
_test [3]
-----------------------------------------------
0.
60
0.00 1/1 main [1]
[4] 12.0 0.
60
0.00 1 fx_1615_longlong_
div01
_test [4]
0.
38
0.00 1/1 main [1]
[4] 12.0 0.
38
0.00 1 fx_1615_longlong_
mul2
_test [4]
-----------------------------------------------
0.
5
8 0.00 1/1 main [1]
[5] 1
1.6
0.
5
8 0.00 1 fx_1615_longlong_
div02
_test [5]
0.
3
8 0.00 1/1 main [1]
[5] 1
2.0
0.
3
8 0.00 1 fx_1615_longlong_
mul3
_test [5]
-----------------------------------------------
Index by function name
[2] fx_1615_double_test
[5
] fx_1615_longlong_
div0
2_test
[
4
] fx_1615_longlong_
div0
1_test [
3
] fx_1615_longlong_
div0
3_test
[2] fx_1615_double_
mul_
test
[4
] fx_1615_longlong_
mul
2_test
[
3
] fx_1615_longlong_
mul
1_test [
5
] fx_1615_longlong_
mul
3_test
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment