bdelespierre / php-kmeans

PHP K-Means
MIT License
91 stars 41 forks source link

Improve micro performance #21

Closed battlecook closed 3 years ago

battlecook commented 3 years ago

Remove unnecessary if state logic in the for loop

bdelespierre commented 3 years ago

It looks you are embarking some commits from another branch. Can you please rebase the current branch?

battlecook commented 3 years ago

I'll check

bdelespierre commented 3 years ago

Here's what you need to do to rebase your branch:

git checkout master
git pull
git checkout improve_micro_performance
git rebase master

# to see your new branch structure (quit by pressing "q")
git log --graph --decorate --oneline --all --color=always | less -R

# you should have only one commit above master
# if everything looks good now you can push your branch and It will update the PR
git push --force

Let me know if you have any issue with these commands

battlecook commented 3 years ago

I tried running the git command you commented.

Here is the execution result

> git checkout master
Switched to branch 'master'
Your branch is up to date with 'origin/master'.

> git pull
Already up to date.

> git checkout improve_micro_performance
Switched to branch 'improve_micro_performance'
Your branch is ahead of 'origin/improve_micro_performance' by 5 commits.
  (use "git push" to publish your local commits)

> git rebase master
Current branch improve_micro_performance is up to date.

> git log --graph --decorate --oneline --all --color=always
*   d7eb205 (HEAD -> improve_micro_performance, origin/master, origin/HEAD, master) Merge branch 'master' of https://github.com/bdelespierre/php-kmeans
|\
| * eded479 removed unused code
| * 93dafc1 added kmeans++ initialize method
| * 0412efe remove unused variable
* |   40df1f5 Merge pull request #1 from battlecook/improve_micro_performance
|\ \
| * | 7d5e7fd (origin/improve_micro_performance) Remove unnecessary if state logic int the for loop
|/ /
* | 41389fb removed unused code
* | 6e0cd0d added kmeans++ initialize method
* | 9b14175 remove unused variable
|/

> git push
Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/battlecook/php-kmeans.git
   7d5e7fd..d7eb205  improve_micro_performance -> improve_micro_performance
bdelespierre commented 3 years ago

ok looks good :+1: