Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加新的接口, 减少数据转换 #9

Closed
wsw0108 opened this issue Feb 8, 2018 · 3 comments
Closed

增加新的接口, 减少数据转换 #9

wsw0108 opened this issue Feb 8, 2018 · 3 comments
Assignees

Comments

@wsw0108
Copy link
Collaborator

wsw0108 commented Feb 8, 2018

通过定义接口, 来兼容其他类Point类型.
参考:

@wsw0108 wsw0108 self-assigned this Feb 8, 2018
@wsw0108
Copy link
Collaborator Author

wsw0108 commented Feb 13, 2018

@wsw0108 wsw0108 closed this as completed Feb 13, 2018
@fuzhenn
Copy link
Member

fuzhenn commented Feb 13, 2018

性能虽然没提升,但避免了不少double[]的创建,应能改善GC,感觉值得修改

@wsw0108
Copy link
Collaborator Author

wsw0108 commented Feb 13, 2018

@fuzhenn 虽然避免了double[]的创建, 但交换条件是forward/inverse只能修改传入的Point类对象. 在泛型里, 根据Java规范, 是没法如下的:

public class Klass<T> {
  public T newInstance() {
    return new T; // error
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants