Optimise code for speed I have made some tests on how to optimise the comparison of 2 arrays and it turned out that the current implementation is about 10% faster than the old one.
Optimise code for speed
I have made some tests on how to optimise the comparison of 2 arrays and it turned out that the current implementation is about 10% faster than the old one.
Implements MAC data type for Swift, also known as EUI-48. This code was influenced by abaumhauer/eui48
Use swift package manager to install MacAddress by adding the proper description to your Package.swift file:
MacAddress
Package.swift
// swift-tools-version:5.1 import PackageDescription let package = Package( name: "YOUR_PROJECT_NAME", dependencies: [ .package(url: "https://github.com/haekelmeister/MacAddress.git", from: "1.0.3"), ] )
Then run swift build to build your applicaton.
swift build
import MacAddress let eui48_1 = MacAddress(withType: .broadcast) print("eui48 = \(eui48_1.dotFormat)") if let eui48_2 = MacAddress(fromString: "0x123456ABCDEF") { print("eui48 = \(eui48_2)") }
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
MacAddress
Implements MAC data type for Swift, also known as EUI-48. This code was influenced by abaumhauer/eui48
Installation
Swift Package Manager
Use swift package manager to install
MacAddress
by adding the proper description to yourPackage.swift
file:Then run
swift build
to build your applicaton.Usage
References