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

Big endian support #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

tnakaike
Copy link

@tnakaike tnakaike commented Apr 4, 2018

This commits add the big endian support for conversion between bytes and a typed value such as Int.

This commits add the big endian support for conversion between bytes and a typed value such as Int.
@Joannis
Copy link
Member

Joannis commented Apr 4, 2018

I don't assume there's any way to unit test this, right?

@tnakaike
Copy link
Author

tnakaike commented Apr 4, 2018

Yes. I cannot prepare the test environment on s390x for you now. I tested all of the unit tests on my machine. All of the tests passed. Let me put the test results.

@tnakaike
Copy link
Author

tnakaike commented Apr 4, 2018

Test results on a s390x machine. Let me screen some performance numbers.

Test Suite 'All tests' started at 2018-04-04 03:54:53.436
Test Suite 'debug.xctest' started at 2018-04-04 03:54:53.437
Test Suite 'MD5Tests' started at 2018-04-04 03:54:53.437
Test Case 'MD5Tests.testBasic' started at 2018-04-04 03:54:53.437
Test Case 'MD5Tests.testBasic' passed (0.001 seconds)
Test Case 'MD5Tests.testPerformance' started at 2018-04-04 03:54:53.438
/home/nakaike/git/CryptoKitten/Tests/CryptoKittenTests/MD5Tests.swift:33: Test Case 'MD5Tests.testPerformance' measured [Time, seconds] average: 8.102, relative standard deviation: 0.231%, values: [8.114241, 8.136363, 8.107532, 8.089877, 8.113880, 8.074640, 8.114601, 8.098041, 8.093881, 8.079154], performanceMetricID:org.swift.XCTPerformanceMetric_WallClockTime, maxPercentRelativeStandardDeviation: 10.000%, maxStandardDeviation: 0.100
Test Case 'MD5Tests.testPerformance' passed (xx.xx seconds)
Test Case 'MD5Tests.testHMAC' started at 2018-04-04 03:56:14.469
Test Case 'MD5Tests.testHMAC' passed (0.001 seconds)
Test Suite 'MD5Tests' passed at 2018-04-04 03:56:14.469
	 Executed 3 tests, with 0 failures (0 unexpected) in 81.032 (xx.xx) seconds
Test Suite 'PBKDF2Tests' started at 2018-04-04 03:56:14.469
Test Case 'PBKDF2Tests.testSHA1' started at 2018-04-04 03:56:14.469
Test Case 'PBKDF2Tests.testSHA1' passed (1.185 seconds)
Test Case 'PBKDF2Tests.testMD5' started at 2018-04-04 03:56:15.655
Test Case 'PBKDF2Tests.testMD5' passed (0.912 seconds)
Test Case 'PBKDF2Tests.testPerformance' started at 2018-04-04 03:56:16.567
/home/nakaike/git/CryptoKitten/Tests/CryptoKittenTests/PBKDF2Tests.swift:45: Test Case 'PBKDF2Tests.testPerformance' measured [Time, seconds] average: 2.961, relative standard deviation: 0.226%, values: [2.973824, 2.964172, 2.966976, 2.957078, 2.958683, 2.949858, 2.957785, 2.965533, 2.962839, 2.957149], performanceMetricID:org.swift.XCTPerformanceMetric_WallClockTime, maxPercentRelativeStandardDeviation: 10.000%, maxStandardDeviation: 0.100
Test Case 'PBKDF2Tests.testPerformance' passed (xx.xx seconds)
Test Suite 'PBKDF2Tests' passed at 2018-04-04 03:56:46.181
	 Executed 3 tests, with 0 failures (0 unexpected) in 31.711 (xx.xx) seconds
Test Suite 'SHA1Tests' started at 2018-04-04 03:56:46.181
Test Case 'SHA1Tests.testBasic' started at 2018-04-04 03:56:46.181
Test Case 'SHA1Tests.testBasic' passed (0.001 seconds)
Test Case 'SHA1Tests.testPerformance' started at 2018-04-04 03:56:46.182
/home/nakaike/git/CryptoKitten/Tests/CryptoKittenTests/SHA1Tests.swift:51: Test Case 'SHA1Tests.testPerformance' measured [Time, seconds] average: 0.000, relative standard deviation: 1.202%, values: [0.000081, 0.000079, 0.000079, 0.000078, 0.000078, 0.000078, 0.000078, 0.000078, 0.000078, 0.000078], performanceMetricID:org.swift.XCTPerformanceMetric_WallClockTime, maxPercentRelativeStandardDeviation: 10.000%, maxStandardDeviation: 0.100
Test Case 'SHA1Tests.testPerformance' passed (0.001 seconds)
Test Case 'SHA1Tests.testHMAC' started at 2018-04-04 03:56:46.183
Test Case 'SHA1Tests.testHMAC' passed (0.001 seconds)
Test Suite 'SHA1Tests' passed at 2018-04-04 03:56:46.184
	 Executed 3 tests, with 0 failures (0 unexpected) in 0.003 (0.003) seconds
Test Suite 'SHA2Tests' started at 2018-04-04 03:56:46.184
Test Case 'SHA2Tests.testSHA224Basic' started at 2018-04-04 03:56:46.184
Test Case 'SHA2Tests.testSHA224Basic' passed (0.0 seconds)
Test Case 'SHA2Tests.testSHA256Basic' started at 2018-04-04 03:56:46.184
Test Case 'SHA2Tests.testSHA256Basic' passed (0.0 seconds)
Test Case 'SHA2Tests.testSHA384Basic' started at 2018-04-04 03:56:46.185
Test Case 'SHA2Tests.testSHA384Basic' passed (0.001 seconds)
Test Case 'SHA2Tests.testSHA512Basic' started at 2018-04-04 03:56:46.185
Test Case 'SHA2Tests.testSHA512Basic' passed (0.001 seconds)
Test Case 'SHA2Tests.testSHA224Performance' started at 2018-04-04 03:56:46.186
/home/nakaike/git/CryptoKitten/Tests/CryptoKittenTests/SHA2Tests.swift:105: Test Case 'SHA2Tests.testSHA224Performance' measured [Time, seconds] average: 0.000, relative standard deviation: 2.222%, values: [0.000109, 0.000111, 0.000106, 0.000105, 0.000104, 0.000105, 0.000105, 0.000105, 0.000105, 0.000105], performanceMetricID:org.swift.XCTPerformanceMetric_WallClockTime, maxPercentRelativeStandardDeviation: 10.000%, maxStandardDeviation: 0.100
Test Case 'SHA2Tests.testSHA224Performance' passed (0.001 seconds)
Test Case 'SHA2Tests.testSHA256Performance' started at 2018-04-04 03:56:46.187
/home/nakaike/git/CryptoKitten/Tests/CryptoKittenTests/SHA2Tests.swift:111: Test Case 'SHA2Tests.testSHA256Performance' measured [Time, seconds] average: 0.000, relative standard deviation: 1.187%, values: [0.000104, 0.000101, 0.000100, 0.000100, 0.000100, 0.000100, 0.000100, 0.000100, 0.000100, 0.000100], performanceMetricID:org.swift.XCTPerformanceMetric_WallClockTime, maxPercentRelativeStandardDeviation: 10.000%, maxStandardDeviation: 0.100
Test Case 'SHA2Tests.testSHA256Performance' passed (0.001 seconds)
Test Case 'SHA2Tests.testSHA384Performance' started at 2018-04-04 03:56:46.188
/home/nakaike/git/CryptoKitten/Tests/CryptoKittenTests/SHA2Tests.swift:117: Test Case 'SHA2Tests.testSHA384Performance' measured [Time, seconds] average: 0.000, relative standard deviation: 1.394%, values: [0.000124, 0.000121, 0.000120, 0.000121, 0.000121, 0.000121, 0.000125, 0.000120, 0.000120, 0.000120], performanceMetricID:org.swift.XCTPerformanceMetric_WallClockTime, maxPercentRelativeStandardDeviation: 10.000%, maxStandardDeviation: 0.100
Test Case 'SHA2Tests.testSHA384Performance' passed (0.001 seconds)
Test Case 'SHA2Tests.testSHA512Performance' started at 2018-04-04 03:56:46.189
/home/nakaike/git/CryptoKitten/Tests/CryptoKittenTests/SHA2Tests.swift:123: Test Case 'SHA2Tests.testSHA512Performance' measured [Time, seconds] average: 0.000, relative standard deviation: 1.021%, values: [0.000128, 0.000125, 0.000124, 0.000124, 0.000124, 0.000124, 0.000124, 0.000124, 0.000124, 0.000124], performanceMetricID:org.swift.XCTPerformanceMetric_WallClockTime, maxPercentRelativeStandardDeviation: 10.000%, maxStandardDeviation: 0.100
Test Case 'SHA2Tests.testSHA512Performance' passed (0.001 seconds)
Test Suite 'SHA2Tests' passed at 2018-04-04 03:56:46.191
	 Executed 8 tests, with 0 failures (0 unexpected) in 0.007 (0.007) seconds
Test Suite 'debug.xctest' passed at 2018-04-04 03:56:46.191
	 Executed 17 tests, with 0 failures (0 unexpected) in xx.xx (xx.xx) seconds
Test Suite 'All tests' passed at 2018-04-04 03:56:46.191
	 Executed 17 tests, with 0 failures (0 unexpected) in xx.xx (xx.xx) seconds

@Joannis
Copy link
Member

Joannis commented Aug 6, 2018

@tnakaike Robbert lost contact with you a while ago. Do you still need Big Endian support?

@tnakaike
Copy link
Author

tnakaike commented Aug 6, 2018

@Joannis Yes. I hope that MongoKitten supports big endian.

I responded to him in Slack. He cannot access slack now?

@Joannis
Copy link
Member

Joannis commented Aug 7, 2018

He's on vacation at the moment for another week. I can pick up the issues, too. Last thing I recall hearing about Big Endian support was his inabiliy to verify this. He wasn't able to get a big endian machine setup at the IBM cloud services.

@tnakaike
Copy link
Author

tnakaike commented Aug 8, 2018

I did not know it. Did he tried this https://developer.ibm.com/linuxone/ ?

Let me check if it works.

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

Successfully merging this pull request may close these issues.

None yet

2 participants